[FFmpeg-cvslog] mov: fix handling of odd sized yv12

Carl Eugen Hoyos git at videolan.org
Tue Jan 1 00:57:56 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Jan  1 00:38:01 2013 +0100| [67abe21c0bdc6fa234ce359f398c77506602f986] | committer: Michael Niedermayer

mov: fix handling of odd sized yv12

Part 1 of 2 to fix Ticket339

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67abe21c0bdc6fa234ce359f398c77506602f986
---

 libavformat/mov.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index a7f6494..ee862e5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1298,8 +1298,11 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
             if (len < 31)
                 avio_skip(pb, 31 - len);
             /* codec_tag YV12 triggers an UV swap in rawdec.c */
-            if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
+            if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)){
                 st->codec->codec_tag=MKTAG('I', '4', '2', '0');
+                st->codec->width &= ~1;
+                st->codec->height &= ~1;
+            }
             /* Flash Media Server uses tag H263 with Sorenson Spark */
             if (format == MKTAG('H','2','6','3') &&
                 !memcmp(st->codec->codec_name, "Sorenson H263", 13))



More information about the ffmpeg-cvslog mailing list