Ticket #339: patchyv12mov.diff

File patchyv12mov.diff, 800 bytes (added by cehoyos, 5 years ago)
  • libavformat/mov.c

    diff --git a/libavformat/mov.c b/libavformat/mov.c
    index 651c685..d081f4f 100644
    a b int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) 
    10271027            if (len < 31) 
    10281028                avio_skip(pb, 31 - len); 
    10291029            /* codec_tag YV12 triggers an UV swap in rawdec.c */ 
    1030             if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)) 
     1030            if (!memcmp(st->codec->codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25)){ 
    10311031                st->codec->codec_tag=MKTAG('I', '4', '2', '0'); 
     1032                st->codec->width &= ~1; 
     1033            } 
    10321034 
    10331035            st->codec->bits_per_coded_sample = avio_rb16(pb); /* depth */ 
    10341036            st->codec->color_table_id = avio_rb16(pb); /* colortable id */