mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
Assume gray8 if 1 < maxval <= 255 in pgm.
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
|
|||||||
if (depth == 1) {
|
if (depth == 1) {
|
||||||
if (maxval == 1) {
|
if (maxval == 1) {
|
||||||
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
|
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
|
||||||
} else if (maxval == 255) {
|
} else if (maxval < 256) {
|
||||||
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
|
||||||
} else {
|
} else {
|
||||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
|
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
|
||||||
|
|||||||
Reference in New Issue
Block a user