From: Carl Eugen Hoyos <[email protected]>

Such files are created by yv12qtcodec from Unthinkable Research

Signed-off-by: Luca Barbato <[email protected]>
---
 libavformat/mov.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d5a75c4..09c3f9f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1169,8 +1169,12 @@ 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))
-                st->codec->codec_tag=MKTAG('I', '4', '2', '0');
+            if (!memcmp(st->codec->codec_name,
+                        "Planar Y'CbCr 8-bit 4:2:0", 25)) {
+                st->codec->width    &= ~1;
+                st->codec->height   &= ~1;
+                st->codec->codec_tag = MKTAG('I', '4', '2', '0');
+            }
             /* Flash Media Server uses tag H263 with Sorenson Spark */
             if (format == MKTAG('H','2','6','3') &&
                 !memcmp(st->codec->codec_name, "Sorenson H263", 13))
-- 
1.8.0.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to