mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-30 15:18:36 +00:00
avcodec/imc: only check remaining bits in case bits will be read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
291747581e
commit
cbf09545f2
@ -803,14 +803,15 @@ static void imc_get_coeffs(AVCodecContext *avctx,
|
|||||||
cw_len = chctx->CWlengthT[j];
|
cw_len = chctx->CWlengthT[j];
|
||||||
cw = 0;
|
cw = 0;
|
||||||
|
|
||||||
if (get_bits_count(&q->gb) + cw_len > 512) {
|
if (cw_len && (!chctx->bandFlagsBuf[i] || !chctx->skipFlags[j])) {
|
||||||
av_log(avctx, AV_LOG_WARNING,
|
if (get_bits_count(&q->gb) + cw_len > 512) {
|
||||||
"Potential problem on band %i, coefficient %i"
|
av_log(avctx, AV_LOG_WARNING,
|
||||||
": cw_len=%i\n", i, j, cw_len);
|
"Potential problem on band %i, coefficient %i"
|
||||||
}
|
": cw_len=%i\n", i, j, cw_len);
|
||||||
|
}
|
||||||
|
|
||||||
if (cw_len && (!chctx->bandFlagsBuf[i] || !chctx->skipFlags[j]))
|
|
||||||
cw = get_bits(&q->gb, cw_len);
|
cw = get_bits(&q->gb, cw_len);
|
||||||
|
}
|
||||||
|
|
||||||
chctx->codewords[j] = cw;
|
chctx->codewords[j] = cw;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user