mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
pnm: remove nonsense code
If maxval is more than 255 than each value takes 2 bytes with most significant byte first. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
bf8f4db413
commit
a0348d0966
@ -163,8 +163,6 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
|
||||
if (s->maxval >= 256) {
|
||||
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
|
||||
if (s->maxval != 65535)
|
||||
avctx->pix_fmt = AV_PIX_FMT_GRAY16;
|
||||
} else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) {
|
||||
if (s->maxval > 255)
|
||||
avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
|
||||
|
Loading…
Reference in New Issue
Block a user