[Mplayer-cvslog] CVS: main/libmpcodecs vd_vfw.c,1.22,1.23

Arpi of Ize arpi at mplayerhq.hu
Sat Oct 19 02:58:07 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv31150

Modified Files:
	vd_vfw.c 
Log Message:
bypass palette from bih, when codec cannot give it in o_bih


Index: vd_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_vfw.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vd_vfw.c	22 Sep 2002 00:43:13 -0000	1.22
+++ vd_vfw.c	19 Oct 2002 00:57:44 -0000	1.23
@@ -240,11 +240,14 @@
     ICSendMessage(priv->handle, ICM_USER+80, (long)(&divx_quality), 0);
 
     // don't do this palette mess always, it makes div3 dll crashing...
-    if((sh->codec->outfmt[sh->outfmtidx]==IMGFMT_BGR8) &&
-       (!ICDecompressGetPalette(priv->handle, sh->bih, priv->o_bih)))
-    {
-	priv->palette = ((unsigned char*)priv->o_bih) + sh->bih->biSize;
-	mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetPalette OK\n");
+    if(sh->codec->outfmt[sh->outfmtidx]==IMGFMT_BGR8){
+	if(ICDecompressGetPalette(priv->handle, sh->bih, priv->o_bih)){
+	    priv->palette = (unsigned char*)(priv->o_bih+1);
+	    mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressGetPalette OK\n");
+	} else {
+	    if(sh->bih->biSize>=40+4*4)
+		priv->palette = (unsigned char*)(sh->bih+1);
+	}
     }
 
     mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");




More information about the MPlayer-cvslog mailing list