diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2010-02-22 15:20:49 +0300 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2010-02-22 15:20:49 +0300 |
commit | fb030bd0461eca0f544782c5a1373620def90772 (patch) | |
tree | 3858afb9bf92e4da22e1325b30bb5ef17cf58d9e /libavcodec/bink.c | |
parent | 9b3c455c5098ce647ac809d6526a71b79fd84a8f (diff) |
Correct bundle lengths calculation for small Bink files.
This fixes issue 1764.
Originally committed as revision 21959 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bink.c')
-rw-r--r-- | libavcodec/bink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 3e8f15fb8d..661f75fec3 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -698,8 +698,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac 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); |