X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fjvdec.c;h=f1fdee5d43026b775458369d99e65f8944a119f5;hb=96bc6485bc929741827fc0f08ef06bea662a3eea;hp=f4941992f6fc19713258843701c30d52be7c13f9;hpb=0ed7bc49a3f7accc4952372b914eb584b1201c86;p=ffmpeg diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index f4941992f6f..f1fdee5d430 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -150,7 +150,7 @@ static int decode_frame(AVCodecContext *avctx, if (video_type == 0 || video_type == 1) { GetBitContext gb; - init_get_bits(&gb, buf, FFMIN(video_size, buf_end - buf)); + init_get_bits(&gb, buf, FFMIN(video_size, (buf_end - buf) * 8)); for (j = 0; j < avctx->height; j += 8) for (i = 0; i < avctx->width; i += 8)