summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/pnm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 5a24befa36..578fe34a6a 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -118,6 +118,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
} else if (maxval < 256) {
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+ } else if (maxval < 65535) {
+ avctx->pix_fmt = AV_PIX_FMT_GRAY16;
} else {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
}