[FFmpeg-cvslog] r21959 - trunk/libavcodec/bink.c

kostya subversion
Mon Feb 22 13:20:49 CET 2010


Author: kostya
Date: Mon Feb 22 13:20:49 2010
New Revision: 21959

Log:
Correct bundle lengths calculation for small Bink files.
This fixes issue 1764.

Modified:
   trunk/libavcodec/bink.c

Modified: trunk/libavcodec/bink.c
==============================================================================
--- trunk/libavcodec/bink.c	Mon Feb 22 13:20:31 2010	(r21958)
+++ trunk/libavcodec/bink.c	Mon Feb 22 13:20:49 2010	(r21959)
@@ -698,8 +698,9 @@ static int decode_frame(AVCodecContext *
         const int stride = c->pic.linesize[plane];
         int bw = plane ? (avctx->width  + 15) >> 4 : (avctx->width  + 7) >> 3;
         int bh = plane ? (avctx->height + 15) >> 4 : (avctx->height + 7) >> 3;
+        int width = avctx->width >> !!plane;
 
-        init_lengths(c, avctx->width >> !!plane, bw);
+        init_lengths(c, FFMAX(width, 8), bw);
         for (i = 0; i < BINK_NB_SRC; i++)
             read_bundle(&gb, c, i);
 



More information about the ffmpeg-cvslog mailing list