[FFmpeg-devel] [PATCH 1/2 v2] lavf/riffenc: Improve spec compliance; Fix WMP playback of AVI with xxpc chunks
Mats Peterson
matsp888 at yahoo.com
Sun Mar 13 09:33:41 CET 2016
I hope this one is an acceptable compromise. Original description follows:
From the Microsoft documentation for BITMAPINFOHEADER at
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318229%28v=vs.85%29.aspx:
"biSize: Specifies the number of bytes required by the structure. This
value does not include the size of the color table or the size of the
color masks, if they are appended to the end of structure."
So, biSize is 40 for palettized video as well. And Windows Media Player
won't display any video when using Microsoft Video 1 in 8 bpp mode or
RLE4/RLE8 if this value is set to anything else than 40.
Regarding the biClrUsed field, I'm setting it to 1 <<
bits_per_coded_sample if palettized video, since setting it to 0 won't
work with Windows Media Player and AVI files with xxpc (palette change)
chunks for some reason.
Mats
--
Mats Peterson
http://matsp888.no-ip.org/~mats/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-riffenc-Improve-spec-compliance-Fix-WMP-playbac.patch
Type: text/x-patch
Size: 5242 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160313/82902f5c/attachment.bin>
More information about the ffmpeg-devel
mailing list