Fix an invalid free in the AVI muxer when an unsupported audio track is added.
authorLaurent Aimar <fenrir@via.ecp.fr>
Tue, 2 Sep 2008 22:53:42 +0000 (22:53 +0000)
committerDiego Biurrun <diego@biurrun.de>
Tue, 2 Sep 2008 22:53:42 +0000 (22:53 +0000)
patch by Laurent Aimar, fenrir via.ecp fr

Originally committed as revision 15159 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avienc.c

index 559e8ab..db59555 100644 (file)
@@ -249,7 +249,6 @@ static int avi_write_header(AVFormatContext *s)
             break;
         case CODEC_TYPE_AUDIO:
             if (put_wav_header(pb, stream) < 0) {
             break;
         case CODEC_TYPE_AUDIO:
             if (put_wav_header(pb, stream) < 0) {
-                av_free(avi);
                 return -1;
             }
             break;
                 return -1;
             }
             break;