avcodec/binkaudio: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Tue, 29 Oct 2013 13:28:33 +0000 (13:28 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 30 Oct 2013 11:04:06 +0000 (11:04 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/binkaudio.c

index b7ad418..8db4533 100644 (file)
@@ -308,7 +308,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
             return AVERROR(ENOMEM);
         s->packet_buffer = buf;
         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
-        init_get_bits(gb, s->packet_buffer, avpkt->size * 8);
+        if ((ret = init_get_bits8(gb, s->packet_buffer, avpkt->size)) < 0)
+            return ret;
         consumed = avpkt->size;
 
         /* skip reported size */