avcodec/ira288: Check init_get_bits8() for failure
Fixes: CID1322321 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
21d8c6612f
commit
194dd15558
@ -207,14 +207,16 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = init_get_bits8(&gb, buf, avctx->block_align);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* get output buffer */
|
/* get output buffer */
|
||||||
frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;
|
frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
out = (float *)frame->data[0];
|
out = (float *)frame->data[0];
|
||||||
|
|
||||||
init_get_bits8(&gb, buf, avctx->block_align);
|
|
||||||
|
|
||||||
for (i=0; i < RA288_BLOCKS_PER_FRAME; i++) {
|
for (i=0; i < RA288_BLOCKS_PER_FRAME; i++) {
|
||||||
float gain = amptable[get_bits(&gb, 3)];
|
float gain = amptable[get_bits(&gb, 3)];
|
||||||
int cb_coef = get_bits(&gb, 6 + (i&1));
|
int cb_coef = get_bits(&gb, 6 + (i&1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user