[FFmpeg-cvslog] jvdec: unbreak video decoding
Paul B Mahol
git at videolan.org
Mon Apr 2 01:45:29 CEST 2012
ffmpeg | branch: release/0.8 | Paul B Mahol <onemda at gmail.com> | Wed Mar 14 03:02:02 2012 +0000| [81c5b4ddcb08d65b691e944d8d8cdc144c19dc9b] | committer: Reinhard Tartler
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 at jannau.net>
CC: libav-stable at libav.org
(cherry picked from commit a1c036e961a32f7208e7315dabfa0ee99d779edb)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=81c5b4ddcb08d65b691e944d8d8cdc144c19dc9b
---
libavcodec/jvdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index 5249764..f2c9752 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)
More information about the ffmpeg-cvslog
mailing list