Fix muxing mjpeg in swf.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 12 Sep 2012 11:08:27 +0000 (13:08 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 13 Sep 2012 07:22:09 +0000 (09:22 +0200)
(cherry picked from commit 7680d99b4302e476076cc1b8f2567f47c2aaef4d)

libavformat/swfenc.c

index af812d0..0ad7b33 100644 (file)
@@ -498,8 +498,10 @@ static int swf_write_trailer(AVFormatContext *s)
         avio_wl32(pb, file_size);
         avio_seek(pb, swf->duration_pos, SEEK_SET);
         avio_wl16(pb, swf->video_frame_number);
+        if (swf->vframes_pos) {
         avio_seek(pb, swf->vframes_pos, SEEK_SET);
         avio_wl16(pb, swf->video_frame_number);
+        }
         avio_seek(pb, file_size, SEEK_SET);
     }
     return 0;