mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-05 23:34:35 +08:00
lavf: remove FF_API_OLD_METADATA cruft
This commit is contained in:
@ -508,10 +508,6 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
|
||||
if (pb && !ic->data_offset)
|
||||
ic->data_offset = avio_tell(ic->pb);
|
||||
|
||||
#if FF_API_OLD_METADATA
|
||||
ff_metadata_demux_compat(ic);
|
||||
#endif
|
||||
|
||||
ic->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE;
|
||||
|
||||
*ic_ptr = ic;
|
||||
@ -2617,18 +2613,11 @@ void avformat_free_context(AVFormatContext *s)
|
||||
av_free(st->codec->extradata);
|
||||
av_free(st->codec->subtitle_header);
|
||||
av_free(st->codec);
|
||||
#if FF_API_OLD_METADATA
|
||||
av_free(st->filename);
|
||||
#endif
|
||||
av_free(st->priv_data);
|
||||
av_free(st->info);
|
||||
av_free(st);
|
||||
}
|
||||
for(i=s->nb_programs-1; i>=0; i--) {
|
||||
#if FF_API_OLD_METADATA
|
||||
av_freep(&s->programs[i]->provider_name);
|
||||
av_freep(&s->programs[i]->name);
|
||||
#endif
|
||||
av_metadata_free(&s->programs[i]->metadata);
|
||||
av_freep(&s->programs[i]->stream_index);
|
||||
av_freep(&s->programs[i]);
|
||||
@ -2636,9 +2625,6 @@ void avformat_free_context(AVFormatContext *s)
|
||||
av_freep(&s->programs);
|
||||
av_freep(&s->priv_data);
|
||||
while(s->nb_chapters--) {
|
||||
#if FF_API_OLD_METADATA
|
||||
av_free(s->chapters[s->nb_chapters]->title);
|
||||
#endif
|
||||
av_metadata_free(&s->chapters[s->nb_chapters]->metadata);
|
||||
av_free(s->chapters[s->nb_chapters]);
|
||||
}
|
||||
@ -2747,9 +2733,6 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int6
|
||||
return NULL;
|
||||
dynarray_add(&s->chapters, &s->nb_chapters, chapter);
|
||||
}
|
||||
#if FF_API_OLD_METADATA
|
||||
av_free(chapter->title);
|
||||
#endif
|
||||
av_metadata_set2(&chapter->metadata, "title", title, 0);
|
||||
chapter->id = id;
|
||||
chapter->time_base= time_base;
|
||||
@ -2887,10 +2870,6 @@ int av_write_header(AVFormatContext *s)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
#if FF_API_OLD_METADATA
|
||||
ff_metadata_mux_compat(s);
|
||||
#endif
|
||||
|
||||
/* set muxer identification string */
|
||||
if (s->nb_streams && !(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
|
||||
av_metadata_set2(&s->metadata, "encoder", LIBAVFORMAT_IDENT, 0);
|
||||
|
Reference in New Issue
Block a user