aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-03-14 03:02:02 +0000
committerReinhard Tartler <siretart@tauware.de>2012-03-14 21:02:23 +0100
commite4e4d92641df31a3c2d5213ac18b9fd5b0c38833 (patch)
treee0415e3c089db7a6e5a804e6a3516842a1548b30 /libavcodec
parentde0ff4ce69c311a2879e10143f1cc2c4945f3ef0 (diff)
downloadffmpeg-e4e4d92641df31a3c2d5213ac18b9fd5b0c38833.tar.gz
jvdec: unbreak video decoding
The safe bitstream reader broke it since the buffer size was specified in bytes instead of bits. Signed-off-by: Janne Grunau <janne-libav@jannau.net> CC: libav-stable@libav.org (cherry picked from commit a1c036e961a32f7208e7315dabfa0ee99d779edb) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index 5249764347..f2c97526c0 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) * 8));
+ init_get_bits(&gb, buf, 8 * FFMIN(video_size, buf_end - buf));
for (j = 0; j < avctx->height; j += 8)
for (i = 0; i < avctx->width; i += 8)