Unified · Split
| @@ -803,14 +803,15 @@ static void imc_get_coeffs(AVCodecContext *avctx, · 802 unmodified lines | |||
| 803 | cw_len = chctx->CWlengthT[j]; | 803 | cw_len = chctx->CWlengthT[j]; |
| 804 | cw = 0; | 804 | cw = 0; |
| 805 | 805 | ||
| 806 | if (get_bits_count(&q->gb) + cw_len > 512) { | 806 | if (cw_len && (!chctx->bandFlagsBuf[i] || !chctx->skipFlags[j])) { |
| 807 | av_log(avctx, AV_LOG_WARNING, | 807 | if (get_bits_count(&q->gb) + cw_len > 512) { |
| 808 | "Potential problem on band %i, coefficient %i" | 808 | av_log(avctx, AV_LOG_WARNING, |
| 809 | ": cw_len=%i\n", i, j, cw_len); | 809 | "Potential problem on band %i, coefficient %i" |
| 810 | } | 810 | ": cw_len=%i\n", i, j, cw_len); |
| 811 | } | ||
| 811 | 812 | ||
| 812 | if (cw_len && (!chctx->bandFlagsBuf[i] || !chctx->skipFlags[j])) | ||
| 813 | cw = get_bits(&q->gb, cw_len); | 813 | cw = get_bits(&q->gb, cw_len); |
| 814 | } | ||
| 814 | 815 | ||
| 815 | chctx->codewords[j] = cw; | 816 | chctx->codewords[j] = cw; |
| 816 | } | 817 | } |