changeset 5586:fc7b009926b5 libavformat

Force codec_tag I420 for Quicktime Planar Y'CbCr 8-bit 4:2:0 raw codec, because YV12 triggers an UV swap in rawdec.c, fixes issue 1687.
author cehoyos
date Sun, 24 Jan 2010 21:37:35 +0000
parents 333f55aab3a2
children 0ab98b4a3778
files mov.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Sun Jan 24 18:18:03 2010 +0000
+++ b/mov.c	Sun Jan 24 21:37:35 2010 +0000
@@ -939,6 +939,9 @@
                     PUT_UTF8(codec_name[i+1], tmp, st->codec->codec_name[pos++] = tmp;)
                 }
                 st->codec->codec_name[pos] = 0;
+                /* 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');
             }
 
             st->codec->bits_per_coded_sample = get_be16(pb); /* depth */