summaryrefslogtreecommitdiffstats
path: root/libmpdemux/aviheader.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-31 09:50:17 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-31 09:50:17 +0000
commit593c86af8eb75703025b2942233b481a741c872e (patch)
tree34a15672eaf86aad01a934a5c0755bb520921cb8 /libmpdemux/aviheader.c
parentbbb69a2db66154598502a68c14396e15f61cc6df (diff)
downloadmpv-593c86af8eb75703025b2942233b481a741c872e.tar.bz2
mpv-593c86af8eb75703025b2942233b481a741c872e.tar.xz
I hate M$. it seems that MSRLE biSize is always 40 when number of colors < 256 instead of 40+colors*4
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5419 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/aviheader.c')
-rw-r--r--libmpdemux/aviheader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index 68024782d4..fba8b324f3 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -176,6 +176,9 @@ while(1){
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;