mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avcodec/apac: stop adding samples if we run out of bits on EOF
This commit is contained in:
parent
1a7efafd33
commit
5d7f3b2639
@ -196,10 +196,14 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (get_bits_left(gb) < c->block_length * c->bit_length && pkt->size) {
|
||||
if (get_bits_left(gb) < c->block_length * c->bit_length) {
|
||||
if (pkt->size) {
|
||||
c->have_code = 1;
|
||||
s->cur_ch = ch;
|
||||
goto end;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < c->block_length; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user