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

Paul B Mahol git at videolan.org
Fri Feb 3 21:02:29 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Feb  3 19:57:13 2017 +0100| [207fa224a0f776e4bfaefdf5e0e758d6d11dd157] | committer: Paul B Mahol

avcodec/mpc8: 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=207fa224a0f776e4bfaefdf5e0e758d6d11dd157
---

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

diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 8894457..80e0e9e 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -261,7 +261,9 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
         memset(c->Q, 0, sizeof(c->Q));
         c->last_bits_used = 0;
     }
-    init_get_bits(gb, buf, buf_size * 8);
+    if ((res = init_get_bits8(gb, buf, buf_size)) < 0)
+        return res;
+
     skip_bits(gb, c->last_bits_used & 7);
 
     if(keyframe)



More information about the ffmpeg-cvslog mailing list