[FFmpeg-cvslog] pngdec: Print error if signature is wrong.

Michael Niedermayer git at videolan.org
Wed Feb 22 03:57:56 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 22 03:36:36 2012 +0100| [8a08503b78f59d61cf98b9deb99363e3e07d8599] | committer: Michael Niedermayer

pngdec: Print error if signature is wrong.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/pngdec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index d4422c1..39afbdd 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -407,8 +407,10 @@ static int decode_frame(AVCodecContext *avctx,
 
     /* check signature */
     if (memcmp(s->bytestream, ff_pngsig, 8) != 0 &&
-        memcmp(s->bytestream, ff_mngsig, 8) != 0)
+        memcmp(s->bytestream, ff_mngsig, 8) != 0) {
+        av_log(avctx, AV_LOG_ERROR, "Missing png signature\n");
         return -1;
+    }
     s->bytestream+= 8;
     s->y=
     s->state=0;



More information about the ffmpeg-cvslog mailing list