[MPlayer-dev-eng] [PATCH] biPlanes must always be 1 in avi files (bug #146)

Reimar =?UTF8?Q?D=F6ffinger?= Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Dec 30 14:49:28 CET 2004


Hi,
> > this patch makes sure that biPlanes is always 1 when writing an AVI, as
> > according to Microsoft that's how it must be (see bugzilla for more
> > information).
> > I intend to apply soon.
> 
> i'm object it.
> first, check a bunch of wild files, they all have 0 there.
> the planes=1 is only true for the uncompressed rgb files.
> for yuv files and codecs it's 0.
> (m$ specs tell about rgb only, yuv formats were added later by non-m$
> ppl, and they define their own rules... i think virtualdub should be
> followed as the most popular and most used tool for creating avi on win32)

Ok, I didn't check that I have to admit. It's up to the bug reporter to
give convincing arguments for it. I'll drop it for now.

> > +          int planes = s->bih->biPlanes;.
> > +          // according to the specs this must always be 1.
> > +          s->bih->biPlanes = 1;.
> >            le2me_BITMAPINFOHEADER(s->bih);.
> >            write_avi_chunk(f,ckidSTREAMFORMAT,biSize,s->bih); /*
> > BITMAPINFOHEADER */.
> >            le2me_BITMAPINFOHEADER(s->bih);.
> > +          s->bih->biPlanes = planes;.
> 
> also, why do you save & restore the old value of biPlanes ???

Why risk breaking something? ;-)

Greetings,
Reimar D?ffinger




More information about the MPlayer-dev-eng mailing list