[FFmpeg-devel] [PATCH v6] lavf: palettized QuickTime video in Matroska
matsp888 at yahoo.com
Wed Dec 23 15:37:18 CET 2015
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14139 bytes
Desc: not available
More information about the ffmpeg-devel