diff options
author | Martin Storsjö <martin@martin.st> | 2011-02-04 12:04:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-06 20:31:45 +0100 |
commit | 42f97696aec6bab0f11704c4de439e5364522ab6 (patch) | |
tree | c5fe50d136d780bb677d27b3c597ca6697f0f44a /ffmpeg.c | |
parent | 8cf2d3d3d71d14169183eaf34faad924120b53d6 (diff) | |
download | ffmpeg-42f97696aec6bab0f11704c4de439e5364522ab6.tar.gz |
Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b22dbb291d41e9fb038884bcebad2394c501cbaf)
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -515,25 +515,11 @@ static int ffmpeg_exit(int ret) /* close files */ for(i=0;i<nb_output_files;i++) { - /* maybe av_close_output_file ??? */ AVFormatContext *s = output_files[i]; int j; if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb) url_fclose(s->pb); - for(j=0;j<s->nb_streams;j++) { - av_metadata_free(&s->streams[j]->metadata); - av_free(s->streams[j]->codec); - av_free(s->streams[j]->info); - av_free(s->streams[j]); - } - for(j=0;j<s->nb_programs;j++) { - av_metadata_free(&s->programs[j]->metadata); - } - for(j=0;j<s->nb_chapters;j++) { - av_metadata_free(&s->chapters[j]->metadata); - } - av_metadata_free(&s->metadata); - av_free(s); + avformat_free_context(s); av_free(output_streams_for_file[i]); } for(i=0;i<nb_input_files;i++) { |