diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index b55f1a9ce4..a8fd9f91f0 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);