[FFmpeg-cvslog] avcodec/pngdec: Replace assert by request for sample for unsupported TRNS cases

Michael Niedermayer git at videolan.org
Thu Nov 26 17:00:15 CET 2015


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Mon Nov 16 18:34:44 2015 +0100| [71a31133330330ebb4db7498a95185c436f59c83] | committer: 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: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit a62178be80dd6a643973f62002fc0ed42495c358)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=71a31133330330ebb4db7498a95185c436f59c83
---

 libavcodec/pngdec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 614c6a5..b4d1fb5 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -663,7 +663,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;



More information about the ffmpeg-cvslog mailing list