avcodec/jpeg2000dec: Also include remaining length in "Block length" error message
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Jun 2015 22:32:01 +0000 (00:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Jun 2015 23:43:14 +0000 (01:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index da0a83a..7b1034e 100644 (file)
@@ -915,8 +915,8 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
                     || sizeof(cblk->data) < cblk->length + cblk->lengthinc[cwsno] + 4
                 ) {
                     av_log(s->avctx, AV_LOG_ERROR,
-                        "Block length %"PRIu16" or lengthinc %d is too large\n",
-                        cblk->length, cblk->lengthinc[cwsno]);
+                        "Block length %"PRIu16" or lengthinc %d is too large, left %d\n",
+                        cblk->length, cblk->lengthinc[cwsno], bytestream2_get_bytes_left(&s->g));
                     return AVERROR_INVALIDDATA;
                 }