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

Mats Peterson matsp888 at yahoo.com
Sun Dec 27 11:44:07 CET 2015


Forgot to remove an av_free(). Patch explanation 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.

Since the ff_get_qtpalette() function has to parse the video sample
description in two different ways, i.e. 1) by using the in-memory
private data when called from matroskadec.c, and 2) by reading from the
file when called from mov.c, it has to use a separate variable for each
of these sources. It may seem slightly redundant, but it is
unfortunately necessary. I would prefer that nobody touches what I've
been doing, since it's working fine right now, and it's very easy to
break things if you try to "improve it". Believe me, I've been there.

-- 
Mats Peterson
http://matsp888.no-ip.org/~mats/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-palettized-QuickTime-video-in-Matroska.patch
Type: text/x-patch
Size: 15197 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151227/24216c76/attachment.bin>


More information about the ffmpeg-devel mailing list