fix hdlr descr in mp4 which use c string, patch by Larbi Joubala, larbi dot joubala...
authorLarbi Joubala <larbi.joubala@resonate-mp4.com>
Sat, 23 May 2009 07:17:17 +0000 (07:17 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 23 May 2009 07:17:17 +0000 (07:17 +0000)
Originally committed as revision 18911 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/movenc.c
tests/ffmpeg.regression.ref
tests/rotozoom.regression.ref

index 3abe388..7a2ce25 100644 (file)
@@ -1013,8 +1013,11 @@ static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track)
     put_be32(pb ,0); /* reserved */
     put_be32(pb ,0); /* reserved */
     put_be32(pb ,0); /* reserved */
-    put_byte(pb, strlen(descr)); /* string counter */
+    if (!track || track->mode == MODE_MOV)
+        put_byte(pb, strlen(descr)); /* pascal string */
     put_buffer(pb, descr, strlen(descr)); /* handler description */
+    if (track && track->mode != MODE_MOV)
+        put_byte(pb, 0); /* c string */
     return updateSize(pb, pos);
 }
 
index 58ef6d3..91264ff 100644 (file)
@@ -62,7 +62,7 @@ e9e884a7c6b77d1aeeb4cb56ac150f92 *./tests/data/a-h263p.avi
 2389564 ./tests/data/a-h263p.avi
 0bb16a352798c997cb36e167f4fa8f3c *./tests/data/h263p.vsynth.out.yuv
 stddev:    2.07 PSNR: 41.77 bytes:  7603200/  7603200
-df90a4c50f47577d8fc83a0184499266 *./tests/data/a-odivx.mp4
+ddb623a6935db992a24594eb39529aa3 *./tests/data/a-odivx.mp4
 550787 ./tests/data/a-odivx.mp4
 a1c691f3be526ecbf3be3152d5bab88c *./tests/data/mpeg4.vsynth.out.yuv
 stddev:    7.99 PSNR: 30.06 bytes:  7603200/  7603200
index 794f152..6c290d2 100644 (file)
@@ -62,7 +62,7 @@ c7644d40e9f40bbd98e5a978f9f94bb4 *./tests/data/a-h263p.avi
 868018 ./tests/data/a-h263p.avi
 4b0ee791f280029dc03c528f76f195d4 *./tests/data/h263p.rotozoom.out.yuv
 stddev:    1.91 PSNR: 42.49 bytes:  7603200/  7603200
-1392b035d1db775c33b4fb90c7b70fa3 *./tests/data/a-odivx.mp4
+47de227982e77830a2db278214a08773 *./tests/data/a-odivx.mp4
 119797 ./tests/data/a-odivx.mp4
 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.rotozoom.out.yuv
 stddev:    5.34 PSNR: 33.56 bytes:  7603200/  7603200