[FFmpeg-cvslog] r19182 - trunk/libavcodec/mpc8.c

kostya subversion
Sat Jun 13 08:41:51 CEST 2009


Author: kostya
Date: Sat Jun 13 08:41:51 2009
New Revision: 19182

Log:
Correct reading bits in MPC SV8 base codes (when we have to read 0 or >16 bits).

Modified:
   trunk/libavcodec/mpc8.c

Modified: trunk/libavcodec/mpc8.c
==============================================================================
--- trunk/libavcodec/mpc8.c	Sat Jun 13 08:39:01 2009	(r19181)
+++ trunk/libavcodec/mpc8.c	Sat Jun 13 08:41:51 2009	(r19182)
@@ -44,7 +44,8 @@ static const int quant_offsets[6] = { MP
 
 static inline int mpc8_dec_base(GetBitContext *gb, int k, int n)
 {
-    int code = get_bits(gb, mpc8_cnk_len[k-1][n-1] - 1);
+    int len = mpc8_cnk_len[k-1][n-1] - 1;
+    int code = len ? get_bits_long(gb, len) : 0;
 
     if (code >= mpc8_cnk_lost[k-1][n-1])
         code = ((code << 1) | get_bits1(gb)) - mpc8_cnk_lost[k-1][n-1];



More information about the ffmpeg-cvslog mailing list