Browse Source

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
tags/n0.11
Paul B Mahol Janne Grunau 13 years ago
parent
commit
a1c036e961
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/jvdec.c

+ 1
- 1
libavcodec/jvdec.c View File

@@ -150,7 +150,7 @@ static int decode_frame(AVCodecContext *avctx,


if (video_type == 0 || video_type == 1) { if (video_type == 0 || video_type == 1) {
GetBitContext gb; 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 (j = 0; j < avctx->height; j += 8)
for (i = 0; i < avctx->width; i += 8) for (i = 0; i < avctx->width; i += 8)


Loading…
Cancel
Save