aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-02-04 12:04:18 +0200
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-04 11:39:55 -0500
commitb22dbb291d41e9fb038884bcebad2394c501cbaf (patch)
treeba3ca832fc842b2e891715513e6ed63d9f16a3c4 /ffmpeg.c
parentff1974897778942180c1d4f95b0b7b45a4fbbc02 (diff)
downloadffmpeg-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.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6d4c0f6ae5..b0d3320824 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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++) {