[FFmpeg-devel] [PATCH]Do not add extradata size to bitmapinfoheader size

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 28 09:55:11 CEST 2014

On Sun, Sep 28, 2014 at 09:50:43AM +0200, Reimar Döffinger wrote:
> On Sat, Sep 27, 2014 at 10:51:25AM +0200, Carl Eugen Hoyos wrote:
> > Hi!
> > 
> > Attached patch is one of two patches necessary to fix ticket #1304.
> > The MSDN documentation indicates that the palette is not part of the 
> > bitmapinfoheader but the bitmapinfoheader is part of the bitmapinfo 
> > structure that also contains the palette.
> > 
> > An alternative is to add the extradata_size except if it is a palette 
> > but imo, attached is more correct.
> biSize must be calculated so that it points to the palette, so if you
> have both extradata and palette you absolutely need to add the
> extradata size:
> > An application should use the information stored in the biSize member to
> > locate the color table in a BITMAPINFO structure, as follows.

Also, we currently do not set biClrUsed, so I can't see how anything
that uses palette could work at all.
Otherwise it would have been correct to set biSize = extradata_size -

More information about the ffmpeg-devel mailing list