[FFmpeg-devel] [PATCH] libavformat: palettized QuickTime in Matroska, round 2

Mats Peterson matsp888 at yahoo.com
Tue Dec 22 11:46:31 CET 2015

On 12/22/2015 03:55 AM, Mats Peterson wrote:
> Alright, this is take two of my fix for palettized QuickTime video in
> Matroska. I have reset the lower limit of V_QUICKTIME private data to 21
> in matroskadec.c, in order to make that broken file pass, Michael. The
> minimum size of a video sample description in QuickTime is really 86,
> for the record.
> Also, I've added copyright notices of the former authors of mov.c to the
> new file qtpalette.c, since the code in that file is borrowed from mov.c
> to a major extent, albeit with some modifications.
> Original 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 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.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Once again, samples for testing are available at 
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk . The file 
smoothie.mov doesn't render correctly for some reason, but that's a 
different issue. Perhaps someone could investigate further.


Mats Peterson

More information about the ffmpeg-devel mailing list