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>
(cherry picked from commit a62178be80dd6a643973f62002fc0ed42495c358)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -663,7 +663,10 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, |
663 | 663 |
break; |
664 | 664 |
|
665 | 665 |
default: |
666 |
- av_assert0(0); |
|
666 |
+ avpriv_request_sample(avctx, "bit depth %d " |
|
667 |
+ "and color type %d with TRNS", |
|
668 |
+ s->bit_depth, s->color_type); |
|
669 |
+ return AVERROR_INVALIDDATA; |
|
667 | 670 |
} |
668 | 671 |
|
669 | 672 |
s->bpp += byte_depth; |