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
1 changed files with 3 additions and 1 deletions

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;