Commit a62178be authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bcac6416
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment