Commit 329221ee authored by Paul B Mahol's avatar Paul B Mahol

pnm: fix 255 < maxval < 65535 for pam with depth 1

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 2c046c71
...@@ -118,6 +118,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) ...@@ -118,6 +118,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
} else if (maxval < 256) { } else if (maxval < 256) {
avctx->pix_fmt = AV_PIX_FMT_GRAY8; avctx->pix_fmt = AV_PIX_FMT_GRAY8;
} else if (maxval < 65535) {
avctx->pix_fmt = AV_PIX_FMT_GRAY16;
} else { } else {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE; avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment