aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-12 16:26:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-12 16:30:50 +0200
commiteaa86850336a9070012957a4643f9cbc69d61c9a (patch)
tree6f9d3b9014509521b78549b1080c796e6f36298c
parent8e91d9652ea5048d9014e7636e12c6ed4732d7b7 (diff)
downloadffmpeg-eaa86850336a9070012957a4643f9cbc69d61c9a.tar.gz
avcodec/jpeg2000dec: Do not abort if prc is outside limits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/jpeg2000dec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c0a8b1f1e1..430a386f8c 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -989,8 +989,11 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile
prcy = ff_jpeg2000_ceildivpow2(y, reducedresno) >> rlevel->log2_prec_height;
precno = prcx + rlevel->num_precincts_x * prcy;
- if (prcx >= rlevel->num_precincts_x || prcy >= rlevel->num_precincts_y)
- return AVERROR_PATCHWELCOME;
+ if (prcx >= rlevel->num_precincts_x || prcy >= rlevel->num_precincts_y) {
+ av_log(s->avctx, AV_LOG_WARNING, "prc %d %d outside limits %d %d\n",
+ prcx, prcy, rlevel->num_precincts_x, rlevel->num_precincts_y);
+ continue;
+ }
for (layno = 0; layno < tile->codsty[0].nlayers; layno++) {
if ((ret = jpeg2000_decode_packet(s, tile, &tp_index, codsty, rlevel,