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

Mats Peterson matsp888 at yahoo.com
Wed Dec 23 11:25:44 CET 2015


Here is another update of my patch for palettized QuickTime video in 
Matroska.

Only read the first 86 - 16 (16 bytes are already read in 
ff_mov_read_stsd_entries()) bytes into the 'stsd' variable in 
mov_parse_stsd_video() in mov.c, since we are going to read the palette 
from the file in ff_get_qtpalette() anyway. Remove the unnecessary 
'size' parameter from mov_parse_stsd_video().

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 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.

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


More information about the ffmpeg-devel mailing list