mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
pnm: fix 255 < maxval < 65535 for pam with depth 1
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
2c046c718a
commit
329221eee7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user