changeset 22019:f43d02e9b58b

Set sh_video->bih->biWidth properly, fixes decoding after latest dec_video.c change
author reimar
date Sun, 28 Jan 2007 09:53:42 +0000
parents 89fcce32d9d0
children a40f222a31df
files libmpdemux/demux_gif.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_gif.c	Sat Jan 27 22:34:27 2007 +0000
+++ b/libmpdemux/demux_gif.c	Sun Jan 28 09:53:42 2007 +0000
@@ -247,9 +247,6 @@
   // 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 @@
   
   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;