mirror of https://git.ffmpeg.org/ffmpeg.git
pnm: remove duplicated check for maxval > 255
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
e82afa3e2d
commit
ae5ecb8e60
|
@ -164,8 +164,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
|
|||
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
|
||||
} else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) {
|
||||
if (s->maxval > 255)
|
||||
avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
|
||||
avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
|
||||
} else {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format\n");
|
||||
avctx->pix_fmt = AV_PIX_FMT_NONE;
|
||||
|
|
Loading…
Reference in New Issue