[FFmpeg-cvslog] avcodec/jpeg2000dec: Print warning if the mqc pointer mismatches at the end

Michael Niedermayer git at videolan.org
Sun Jun 14 21:46:50 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 14 21:19:40 2015 +0200| [6b08dc393b5203c52c4d76a89e5c0bb12c134df7] | committer: Michael Niedermayer

avcodec/jpeg2000dec: Print warning if the mqc pointer mismatches at the end

If this occurs on valid and correctly decoded files it should be reduced to debug
level

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b08dc393b5203c52c4d76a89e5c0bb12c134df7
---

 libavcodec/jpeg2000dec.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 1a8ba38..de9aa6d 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1392,6 +1392,11 @@ 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);
+    }
+
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list