Assume gray8 if 1 < maxval <= 255 in pgm.
This commit is contained in:
parent
ae4dc0b37a
commit
7e8e8ba9cc
@ -116,7 +116,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
|
||||
if (depth == 1) {
|
||||
if (maxval == 1) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
|
||||
} else if (maxval == 255) {
|
||||
} else if (maxval < 256) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
||||
} else {
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user