diff dec_video.c @ 4687:2973e997c4a5

some obscure bug fixes to the FLI decoder, with many thanks to Roberto Togni
author melanson
date Wed, 13 Feb 2002 04:06:55 +0000
parents 030b3125e6f0
children d3a52470594c
line wrap: on
line diff
--- a/dec_video.c	Wed Feb 13 03:14:45 2002 +0000
+++ b/dec_video.c	Wed Feb 13 04:06:55 2002 +0000
@@ -118,13 +118,16 @@
   unsigned char *palette_map,
   int bytes_per_pixel);
 
-void Decode_Fli(
+void *init_fli_decoder(int width, int height);
+
+void decode_fli_frame(
   unsigned char *encoded,
   int encoded_size,
   unsigned char *decoded,
   int width,
   int height,
-  int bytes_per_pixel);
+  int bytes_per_pixel,
+  void *context);
 
 void qt_decode_rle(
   unsigned char *encoded,
@@ -712,8 +715,9 @@
      }
    }
    break;
+ case VFM_FLI:
+   sh_video->context = init_fli_decoder(sh_video->disp_w, sh_video->disp_h);
  case VFM_MSVIDC:
- case VFM_FLI:
  case VFM_QTRLE:
  case VFM_DUCKTM1:
 #ifdef HAVE_PNG
@@ -1117,10 +1121,11 @@
     blit_frame = 3;
     break;
   case VFM_FLI:
-    Decode_Fli(
+    decode_fli_frame(
         start, in_size, sh_video->our_out_buffer,
         sh_video->disp_w, sh_video->disp_h,
-        ((out_fmt&255)+7)/8);
+        ((out_fmt&255)+7)/8,
+        sh_video->context);
     blit_frame = 3;
     break;
   case VFM_NUV: