avcodec/atrac3: Check init_get_bits8() for failure
This is more for correctness than actually fixing a missing error path Fixes CID1399967 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2104e3383f
commit
e976e68fc5
@ -693,8 +693,10 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf,
|
|||||||
|
|
||||||
|
|
||||||
/* set the bitstream reader at the start of the second Sound Unit */
|
/* set the bitstream reader at the start of the second Sound Unit */
|
||||||
init_get_bits8(&q->gb,
|
ret = init_get_bits8(&q->gb,
|
||||||
ptr1, q->decoded_bytes_buffer + js_block_align - ptr1);
|
ptr1, q->decoded_bytes_buffer + js_block_align - ptr1);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* Fill the Weighting coeffs delay buffer */
|
/* Fill the Weighting coeffs delay buffer */
|
||||||
memmove(q->weighting_delay[js_pair], &q->weighting_delay[js_pair][2],
|
memmove(q->weighting_delay[js_pair], &q->weighting_delay[js_pair][2],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user