fix hdlr descr in mp4 which use c string, patch by Larbi Joubala, larbi dot joubala at resonate-mp4 dot com

Originally committed as revision 18911 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Larbi Joubala 2009-05-23 07:17:17 +00:00 committed by Baptiste Coudurier
parent 84df78b476
commit 606d48cee1
3 changed files with 6 additions and 3 deletions

View 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);
}

View 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

View 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