diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 91efbe40d6..13ecbb057f 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -126,7 +126,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) avctx->pix_fmt = AV_PIX_FMT_GRAY8A; } else if (depth == 3) { if (maxval < 256) { - avctx->pix_fmt = AV_PIX_FMT_RGB24; + avctx->pix_fmt = AV_PIX_FMT_RGB24; } else { avctx->pix_fmt = AV_PIX_FMT_RGB48BE; }