mirror of https://github.com/mpv-player/mpv
bypass palette from bih, when codec cannot give it in o_bih
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7790 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
cee57cf702
commit
e305745f60
|
@ -240,11 +240,14 @@ static int init(sh_video_t *sh){
|
|||
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;
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue