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

Paul B Mahol git at videolan.org
Fri Jul 3 19:03:07 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jul  3 16:57:11 2015 +0000| [94cfb6db7d6c1f63f77f751fc705d9f0aef8dbe0] | committer: Paul B Mahol

avcodec/shorten: 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=94cfb6db7d6c1f63f77f751fc705d9f0aef8dbe0
---

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

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index db2e3c5..5132aa5 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -466,7 +466,8 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
         }
     }
     /* init and position bitstream reader */
-    init_get_bits(&s->gb, buf, buf_size * 8);
+    if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
+        return ret;
     skip_bits(&s->gb, s->bitindex);
 
     /* process header or next subblock */



More information about the ffmpeg-cvslog mailing list