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

Mats Peterson matsp888 at yahoo.com
Tue Dec 22 17:59:30 CET 2015

On 12/22/2015 05:15 PM, Michael Niedermayer wrote:
> On Tue, Dec 22, 2015 at 03:55:48AM +0100, 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.
>> --
>> Mats Peterson
>> http://matsp888.no-ip.org/~mats/
> [...]
>> +int get_qtpalette(int codec_id, uint8_t *stsd, uint32_t *palette)
> non static functions need a prefix (ff_ in this case)
> [...]
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Thank you for notifying me. I'll change that. I have other issues to 
solve here as well.


Mats Peterson

More information about the ffmpeg-devel mailing list