summaryrefslogtreecommitdiff
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-02-04 13:44:22 +0000
committerPaul B Mahol <onemda@gmail.com>2015-02-05 09:48:54 +0000
commitdccd648f9fa0fbf9b25244d342344a56b181b331 (patch)
tree9c68c595b8b3b8eec64abbc26664d1c0fb144d82 /libavcodec/alsdec.c
parent57bca64b3f445004243cac091df9c01588a51b9a (diff)
avcodec/alsdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index cfece44285..b3d30861b3 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1478,7 +1478,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
int invalid_frame, ret;
unsigned int c, sample, ra_frame, bytes_read, shift;
- init_get_bits(&ctx->gb, buffer, buffer_size * 8);
+ if ((ret = init_get_bits8(&ctx->gb, buffer, buffer_size)) < 0)
+ return ret;
// In the case that the distance between random access frames is set to zero
// (sconf->ra_distance == 0) no frame is treated as a random access frame.