diff options
author | Martin Storsjö <martin@martin.st> | 2011-02-04 12:04:18 +0200 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-04 11:39:55 -0500 |
commit | b22dbb291d41e9fb038884bcebad2394c501cbaf (patch) | |
tree | ba3ca832fc842b2e891715513e6ed63d9f16a3c4 /ffmpeg.c | |
parent | ff1974897778942180c1d4f95b0b7b45a4fbbc02 (diff) | |
download | ffmpeg-b22dbb291d41e9fb038884bcebad2394c501cbaf.tar.gz |
Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -505,25 +505,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++) { |