From c4e3724713a0f2903224999da1f12a15e96a2811 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 5 Mar 2004 22:51:22 +0000 Subject: [PATCH] write trailer before closing codecs as otherwise accesses to extradata in write_trailer() will cause a segfault Originally committed as revision 2852 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 86fbf3d5b4..bbb6fabe47 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1510,6 +1510,12 @@ static int av_encode(AVFormatContext **output_files, /* dump report by using the first video and audio streams */ print_report(output_files, ost_table, nb_ostreams, 1); + /* write the trailer if needed and close file */ + for(i=0;ist->codec); } } - - /* write the trailer if needed and close file */ - for(i=0;i