1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

pngdec: Print error if signature is wrong.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-02-22 03:36:36 +01:00
parent 184fc600e1
commit 8a08503b78

View File

@ -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;