aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-02-03 15:15:11 +0000
committerPaul B Mahol <onemda@gmail.com>2015-02-04 09:45:41 +0000
commitc93a7b264f76a0c92e25a561848448333731fbce (patch)
tree089b14beb298ca392ead4832befb96717abd16e3 /libavcodec
parente9eb94ac5a66fd1e91b4279156bc0cdd0117b576 (diff)
downloadffmpeg-c93a7b264f76a0c92e25a561848448333731fbce.tar.gz
avcodec/ac3dec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index d3e8713e03..20c2889ade 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1429,7 +1429,8 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
memcpy(s->input_buffer, buf, FFMIN(buf_size, AC3_FRAME_BUFFER_SIZE));
buf = s->input_buffer;
/* initialize the GetBitContext with the start of valid AC-3 Frame */
- init_get_bits(&s->gbc, buf, buf_size * 8);
+ if ((ret = init_get_bits8(&s->gbc, buf, buf_size)) < 0)
+ return ret;
/* parse the syncinfo */
err = parse_frame_header(s);