Browse Source

pngdec: print error message for truncated pngs even if we output them

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
8f394a6cf8
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/pngdec.c

+ 2
- 1
libavcodec/pngdec.c View File

@@ -594,8 +594,9 @@ static int decode_frame(AVCodecContext *avctx,
}
break;
case MKTAG('I', 'E', 'N', 'D'):
if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
if (!(s->state & PNG_ALLIMAGE))
av_log(avctx, AV_LOG_ERROR, "IEND without all image\n");
if (!(s->state & (PNG_ALLIMAGE|PNG_IDAT))) {
goto fail;
}
bytestream2_skip(&s->gb, 4); /* crc */


Loading…
Cancel
Save