1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Assume gray8 if 1 < maxval <= 255 in pgm.

This commit is contained in:
Carl Eugen Hoyos 2013-07-28 18:12:23 +02:00
parent ae4dc0b37a
commit 7e8e8ba9cc

View File

@ -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;