History

avcodec/imc: only check remaining bits in case bits will be read

Michael Niedermayer committed 11 years ago

Commit cbf09541 parent 29174751 file · +7 −6Browse files

Unified · Split

libavcodec/imc.c+7−6
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t