[FFmpeg-devel] [PATCH v6] lavf: palettized QuickTime video in Matroska

Mats Peterson matsp888 at yahoo.com
Wed Dec 23 16:02:10 CET 2015


On 12/23/2015 03:37 PM, Mats Peterson wrote:
> I mistakenly used 'extradata' rather than 'st->codec->extradata',
> naturally leading to a segfault. Here's an updated patch.
>
> An explanation of the patch follows:
>
> Palettized QuickTime video in Matroska has hitherto not been recognized
> whatsoever, and the "palette" used has been completely random.
>
> The patch for matroskadec.c fixes this issue by adding a palette side
> data packet in matroska_deliver_packet(), much in the same way as it's
> done in mov.c.
>
> The change to mov.c consists mainly of moving the palette handling from
> the mov_parse_stsd_video() function to a new ff_get_qtpalette() function
> in the new file qtpalette.c, which is shared by both matroskadec.c and
> mov.c.
>
> In matroskadec.c, I'm also putting the palette in 'extradata', like it's
> done for V_MS/VFW/FOURCC; this is a requirement in order for MPlayer to
> recognize the palette. And why is this, you may wonder. Well, it's
> because for some mysterious reason, MPlayer adds ANOTHER palette side
> data packet after the one added in matroskadec.c. It uses whatever is in
> extradata as the palette when adding this packet.
>
> Mats
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Samples: https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk

-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/


More information about the ffmpeg-devel mailing list