From 1de8dfcbc494e470e5caf35e1cd0650e834d8f7e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 29 Oct 2013 13:28:33 +0000 Subject: [PATCH] avcodec/binkaudio: use init_get_bits8() Signed-off-by: Paul B Mahol --- libavcodec/binkaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index b7ad41897f..8db4533221 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -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 */