avcodec/jpeg2000dec: Improve end check
Fixes spurious end mismatch warnings Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
36241c4055
commit
20657e05bc
@ -1404,8 +1404,9 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
|
||||
pass_cnt ++;
|
||||
}
|
||||
|
||||
if (cblk->data + cblk->length != t1->mqc.bp) {
|
||||
av_log(s->avctx, AV_LOG_WARNING, "End mismatch %"PTRDIFF_SPECIFIER"\n", cblk->data + cblk->length - t1->mqc.bp);
|
||||
if (cblk->data + cblk->length - 2*(term_cnt < cblk->nb_terminations) != t1->mqc.bp) {
|
||||
av_log(s->avctx, AV_LOG_WARNING, "End mismatch %"PTRDIFF_SPECIFIER"\n",
|
||||
cblk->data + cblk->length - 2*(term_cnt < cblk->nb_terminations) - t1->mqc.bp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user