[FFmpeg-cvslog] swfenc: zero fifo after freeing

Michael Niedermayer git at videolan.org
Sat Oct 27 23:06:41 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 27 23:02:17 2012 +0200| [0f943ed3c8e5839db61958a59300c866680ece3d] | committer: Michael Niedermayer

swfenc: zero fifo after freeing

Fixes CID602000
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f943ed3c8e5839db61958a59300c866680ece3d
---

 libavformat/swfenc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index b55f1a9..a8fd9f9 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -487,8 +487,10 @@ static int swf_write_trailer(AVFormatContext *s)
         enc = s->streams[i]->codec;
         if (enc->codec_type == AVMEDIA_TYPE_VIDEO)
             video_enc = enc;
-        else
+        else {
             av_fifo_free(swf->audio_fifo);
+            swf->audio_fifo = NULL;
+        }
     }
 
     put_swf_tag(s, TAG_END);



More information about the ffmpeg-cvslog mailing list