[FFmpeg-cvslog] avcodec/mdec: use init_get_bits8()
Paul B Mahol
git at videolan.org
Wed Aug 21 20:41:38 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 21 18:34:04 2013 +0000| [9a5aa2c48e3583b549158afe1429b8f25b77e622] | committer: Paul B Mahol
avcodec/mdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9a5aa2c48e3583b549158afe1429b8f25b77e622
---
libavcodec/mdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index bd1966e..9211fe7 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -177,7 +177,8 @@ static int decode_frame(AVCodecContext *avctx,
a->bitstream_buffer[i] = buf[i + 1];
a->bitstream_buffer[i + 1] = buf[i];
}
- init_get_bits(&a->gb, a->bitstream_buffer, buf_size * 8);
+ if ((ret = init_get_bits8(&a->gb, a->bitstream_buffer, buf_size)) < 0)
+ return ret;
/* skip over 4 preamble bytes in stream (typically 0xXX 0xXX 0x00 0x38) */
skip_bits(&a->gb, 32);
More information about the ffmpeg-cvslog
mailing list