[FFmpeg-devel] [PATCH]Write valid free atom with -moov_size

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jul 16 13:45:47 CEST 2014


Hi!

Attached patch fixes ticket #3769.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b3287ca..4b9a4f1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4398,8 +4398,7 @@ static int mov_write_trailer(AVFormatContext *s)
             }
             avio_wb32(pb, size);
             ffio_wfourcc(pb, "free");
-            for (i = 0; i < size; i++)
-                avio_w8(pb, 0);
+            ffio_fill(pb, 0, size - 8);
             avio_seek(pb, moov_pos, SEEK_SET);
         } else {
             mov_write_moov_tag(pb, mov, s);


More information about the ffmpeg-devel mailing list