deprecate old metadata API

Originally committed as revision 17690 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2009-03-01 16:35:25 +00:00
parent bc718b4720
commit 827f7e285b
3 changed files with 19 additions and 1 deletions

View File

@@ -2301,13 +2301,17 @@ void av_close_input_stream(AVFormatContext *s)
av_free(st->index_entries);
av_free(st->codec->extradata);
av_free(st->codec);
#if LIBAVFORMAT_VERSION_INT < (53<<16)
av_free(st->filename);
#endif
av_free(st->priv_data);
av_free(st);
}
for(i=s->nb_programs-1; i>=0; i--) {
#if LIBAVFORMAT_VERSION_INT < (53<<16)
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]);
@@ -2316,7 +2320,9 @@ void av_close_input_stream(AVFormatContext *s)
flush_packet_queue(s);
av_freep(&s->priv_data);
while(s->nb_chapters--) {
#if LIBAVFORMAT_VERSION_INT < (53<<16)
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]);
}
@@ -2414,7 +2420,9 @@ AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int6
return NULL;
dynarray_add(&s->chapters, &s->nb_chapters, chapter);
}
#if LIBAVFORMAT_VERSION_INT < (53<<16)
av_free(chapter->title);
#endif
av_metadata_set(&chapter->metadata, "title", title);
chapter->id = id;
chapter->time_base= time_base;