summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-04 23:17:12 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-04 23:17:12 +0000
commita0348d0966a81a66f3a1bf061576b24d5296b933 (patch)
treed112c4933e40696a5fe96b8aeb54693d4921a460 /libavcodec/pnm.c
parentbf8f4db4135c49f7347a1d85f09cd9aa7d564ef9 (diff)
downloadffmpeg-a0348d0966a81a66f3a1bf061576b24d5296b933.tar.gz
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>
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index c5c600b841..1baf1a7d6c 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -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;