changeset 5418:5b852c08473f

I hate M$. it seems that MSRLE biSize is always 40 when number of colors < 256 instead of 40+colors*4
author arpi
date Sun, 31 Mar 2002 09:50:17 +0000
parents a890a999ca9a
children e0a0c8d848a1
files libmpdemux/aviheader.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Sun Mar 31 09:29:19 2002 +0000
+++ b/libmpdemux/aviheader.c	Sun Mar 31 09:50:17 2002 +0000
@@ -176,6 +176,9 @@
         mp_msg(MSGT_HEADER,MSGL_V,"found 'bih', %d bytes of %d\n",chunksize,sizeof(BITMAPINFOHEADER));
         stream_read(demuxer->stream,(char*) sh_video->bih,chunksize);
 	le2me_BITMAPINFOHEADER(sh_video->bih);  // swap to machine endian
+	// fixup MS-RLE header (seems to be broken for <256 color files)
+	if(sh_video->bih->biCompression==1 && sh_video->bih->biSize==40)
+	    sh_video->bih->biSize=chunksize;
         if(verbose>=1) print_video_header(sh_video->bih);
         chunksize=0;
 //        sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;