summaryrefslogtreecommitdiff
path: root/libavcodec/g723_1dec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-12-23 15:40:47 +0100
committerPaul B Mahol <onemda@gmail.com>2018-12-23 15:40:47 +0100
commitf52dd8a55a98418b6301cce4a56d2b73d08b7eea (patch)
tree145c86c849de75cb804f9bf54d50b5b3b9a9a845 /libavcodec/g723_1dec.c
parent3601eb04745600ae6784e874d36a868f459f88c8 (diff)
downloadffmpeg-f52dd8a55a98418b6301cce4a56d2b73d08b7eea.tar.gz
avcodec/g723_1dec: use init_get_bits8()
Diffstat (limited to 'libavcodec/g723_1dec.c')
-rw-r--r--libavcodec/g723_1dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c
index 028cde0f37..676c4bbac3 100644
--- a/libavcodec/g723_1dec.c
+++ b/libavcodec/g723_1dec.c
@@ -78,8 +78,11 @@ static int unpack_bitstream(G723_1_ChannelContext *p, const uint8_t *buf,
GetBitContext gb;
int ad_cb_len;
int temp, info_bits, i;
+ int ret;
- init_get_bits(&gb, buf, buf_size * 8);
+ ret = init_get_bits8(&gb, buf, buf_size);
+ if (ret < 0)
+ return ret;
/* Extract frame type and rate info */
info_bits = get_bits(&gb, 2);