pnm: Fix spurious error message.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 14 years ago
parent 7030501383
commit 0257ac8f12
  1. 2
      libavcodec/pnm.c

@ -135,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
return -1; return -1;
pnm_get(s, buf1, sizeof(buf1)); pnm_get(s, buf1, sizeof(buf1));
avctx->height = atoi(buf1); avctx->height = atoi(buf1);
if(av_image_check_size(avctx->width, avctx->height, 0, avctx)) if(avctx->height <= 0 || av_image_check_size(avctx->width, avctx->height, 0, avctx))
return -1; return -1;
if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
pnm_get(s, buf1, sizeof(buf1)); pnm_get(s, buf1, sizeof(buf1));

Loading…
Cancel
Save