[FFmpeg-cvslog] avcodec/mpc7: use init_get_bits8()

Paul B Mahol git at videolan.org
Fri Feb 3 21:19:11 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Feb  3 20:16:30 2017 +0100| [f09afb4a90b2ee14577b4bedc9f16ac2b5dfcf72] | committer: Paul B Mahol

avcodec/mpc7: 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=f09afb4a90b2ee14577b4bedc9f16ac2b5dfcf72
---

 libavcodec/mpc7.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index d13316b..e09f1b6 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -231,7 +231,8 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
         return AVERROR(ENOMEM);
     c->bdsp.bswap_buf((uint32_t *) c->bits, (const uint32_t *) buf,
                       buf_size >> 2);
-    init_get_bits(&gb, c->bits, buf_size * 8);
+    if ((ret = init_get_bits8(&gb, c->bits, buf_size)) < 0)
+        return ret;
     skip_bits_long(&gb, skip);
 
     /* read subband indexes */



More information about the ffmpeg-cvslog mailing list