diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-22 03:36:36 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-22 03:37:18 +0100 |
commit | 8a08503b78f59d61cf98b9deb99363e3e07d8599 (patch) | |
tree | e1850a2d8b898ee471188a4652fe56e5869aaf15 /libavcodec | |
parent | 184fc600e101bb6190ec92a8a3be8898ff22d225 (diff) | |
download | ffmpeg-8a08503b78f59d61cf98b9deb99363e3e07d8599.tar.gz |
pngdec: Print error if signature is wrong.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pngdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index d4422c181f..39afbdd045 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; |