[FFmpeg-cvslog] avcodec/jpeg2000dec: Improve end check
Michael Niedermayer
git at videolan.org
Tue Jun 16 18:50:12 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 16 18:34:20 2015 +0200| [20657e05bc2608dae03e7e8d47da11c2cdcaed38] | committer: Michael Niedermayer
avcodec/jpeg2000dec: Improve end check
Fixes spurious end mismatch warnings
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20657e05bc2608dae03e7e8d47da11c2cdcaed38
---
libavcodec/jpeg2000dec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 6c86cb3..8eba2a3 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list