X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpnm.c;h=502e550097b792fe241d8fd9aead32dc35baad43;hb=c218d8218d95684c5e1b4c09ed0f258457f0ae7c;hp=63b77cd8076e9ce4bc4066bf5850ba6c5d452e68;hpb=92de4450347cbee96e64de341ac6fa733ea13cd1;p=ffmpeg diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 63b77cd8076..502e550097b 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -63,9 +63,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) int h, w, depth, maxval; pnm_get(s, buf1, sizeof(buf1)); - s->type= buf1[1]-'0'; if(buf1[0] != 'P') return AVERROR_INVALIDDATA; + s->type= buf1[1]-'0'; if (s->type==1 || s->type==4) { avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;