mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/adpcm: Check init_get_bits8() for failure
Fixes CID1322317 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
cf410f8fb9
commit
66a7bc0010
@ -775,7 +775,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int samples_per_block = ff_adpcm_ima_block_samples[avctx->bits_per_coded_sample - 2];
|
||||
GetBitContext g;
|
||||
|
||||
init_get_bits8(&g, gb.buffer, bytestream2_get_bytes_left(&gb));
|
||||
ret = init_get_bits8(&g, gb.buffer, bytestream2_get_bytes_left(&gb));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
for (n = 0; n < (nb_samples - 1) / samples_per_block; n++) {
|
||||
for (i = 0; i < avctx->channels; i++) {
|
||||
cs = &c->status[i];
|
||||
|
Loading…
Reference in New Issue
Block a user