swfenc: zero fifo after freeing
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Oct 2012 21:02:17 +0000 (23:02 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Oct 2012 21:03:07 +0000 (23:03 +0200)
Fixes CID602000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/swfenc.c

index b55f1a9..a8fd9f9 100644 (file)
@@ -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);