[MPlayer-dev-eng] [PATCH] biPlanes must always be 1 in avi files (bug #146)
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Dec 30 12:12:24 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.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: muxer_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_avi.c,v
retrieving revision 1.29
diff -u -r1.29 muxer_avi.c
--- muxer_avi.c 5 Sep 2004 16:55:06 -0000 1.29
+++ muxer_avi.c 12 Dec 2004 10:34:05 -0000
@@ -424,9 +424,13 @@
case MUXER_TYPE_VIDEO:
{
int biSize=s->bih->biSize;
+ 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;
if (aspect != 0) {
int fields = vprp.nbFieldPerFrame;
More information about the MPlayer-dev-eng
mailing list