summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-16 18:34:44 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-16 18:48:02 +0100
commita62178be80dd6a643973f62002fc0ed42495c358 (patch)
treee96777966ae55c53bb7aba6fea078006b8f6fdef /libavcodec/pngdec.c
parentbcac6416b8f5384b4c143f8f970dd9e23dacd132 (diff)
avcodec/pngdec: Replace assert by request for sample for unsupported TRNS cases
Fixes assertion failure Fixes: 7f646252a30ee28b583aac1f82e7985e/signal_sigabrt_7ffff6ae7cc9_7353_62fc077bf2f454d39e188c69807193a6.png Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index fe81d02601..305908700b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -665,7 +665,10 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s,
break;
default:
- av_assert0(0);
+ avpriv_request_sample(avctx, "bit depth %d "
+ "and color type %d with TRNS",
+ s->bit_depth, s->color_type);
+ return AVERROR_INVALIDDATA;
}
s->bpp += byte_depth;