summaryrefslogtreecommitdiff
path: root/libavcodec/metasound.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-02-03 20:29:27 +0100
committerPaul B Mahol <onemda@gmail.com>2017-02-03 20:29:27 +0100
commit2b707018bca80496d52ccfd2777af98cc0a21546 (patch)
treef328cb0868489fc40a121d15fa2bb0977f298f0b /libavcodec/metasound.c
parent7ecdc03ea3da6acdf756bb689f159b053c2b8b0b (diff)
downloadffmpeg-2b707018bca80496d52ccfd2777af98cc0a21546.tar.gz
avcodec/metasound: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/metasound.c')
-rw-r--r--libavcodec/metasound.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c
index 6a7e31a26b..87cd7cb211 100644
--- a/libavcodec/metasound.c
+++ b/libavcodec/metasound.c
@@ -170,9 +170,10 @@ static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
int channels = tctx->avctx->channels;
int sub;
GetBitContext gb;
- int i, j, k;
+ int i, j, k, ret;
- init_get_bits(&gb, buf, buf_size * 8);
+ if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0)
+ return ret;
for (tctx->cur_frame = 0; tctx->cur_frame < tctx->frames_per_packet;
tctx->cur_frame++) {