# HG changeset patch # User kostya # Date 1266841249 0 # Node ID eb773ca000d948bd21831cb1e8d430ca76fb9fb8 # Parent e71b0be9ac790f0edb611e88070e5ab1b7ba3c59 Correct bundle lengths calculation for small Bink files. This fixes issue 1764. diff -r e71b0be9ac79 -r eb773ca000d9 bink.c --- a/bink.c Mon Feb 22 12:20:31 2010 +0000 +++ b/bink.c Mon Feb 22 12:20:49 2010 +0000 @@ -698,8 +698,9 @@ 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);