diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 3abe388588..7a2ce2526a 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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); } diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index 58ef6d3591..91264ff91a 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -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 diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index 794f152ed7..6c290d2718 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -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