[FFmpeg-cvslog] avcodec/g723_1dec: use init_get_bits8()
Paul B Mahol
git at videolan.org
Sun Dec 23 16:44:40 EET 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 23 15:40:47 2018 +0100| [f52dd8a55a98418b6301cce4a56d2b73d08b7eea] | committer: Paul B Mahol
avcodec/g723_1dec: use init_get_bits8()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f52dd8a55a98418b6301cce4a56d2b73d08b7eea
---
libavcodec/g723_1dec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list