mirror of https://github.com/mpv-player/mpv
Set sh_video->bih->biWidth properly, fixes decoding after latest dec_video.c change
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22037 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
edf1fb46d2
commit
c518d68f25
|
@ -247,9 +247,6 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer)
|
|||
// video_read_properties() will choke
|
||||
sh_video->ds = demuxer->video;
|
||||
|
||||
sh_video->disp_w = (uint16_t)gif->SWidth;
|
||||
sh_video->disp_h = (uint16_t)gif->SHeight;
|
||||
|
||||
sh_video->format = mmioFOURCC(8, 'R', 'G', 'B');
|
||||
|
||||
sh_video->fps = 5.0f;
|
||||
|
@ -257,11 +254,11 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer)
|
|||
|
||||
sh_video->bih = malloc(sizeof(BITMAPINFOHEADER) + (256 * 4));
|
||||
sh_video->bih->biCompression = sh_video->format;
|
||||
sh_video->bih->biWidth = priv->w = (uint16_t)gif->SWidth;
|
||||
sh_video->bih->biHeight = priv->h = (uint16_t)gif->SHeight;
|
||||
sh_video->bih->biBitCount = 8;
|
||||
sh_video->bih->biPlanes = 2;
|
||||
priv->palette = (unsigned char *)(sh_video->bih + 1);
|
||||
priv->w = sh_video->disp_w;
|
||||
priv->h = sh_video->disp_h;
|
||||
priv->refimg = malloc(priv->w * priv->h);
|
||||
|
||||
priv->gif = gif;
|
||||
|
|
Loading…
Reference in New Issue