Browse Source

pnm: fix 255 < maxval < 65535 for pam with depth 1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.1
Paul B Mahol 12 years ago
parent
commit
329221eee7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/pnm.c

+ 2
- 0
libavcodec/pnm.c View File

@@ -118,6 +118,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
} else if (maxval < 256) {
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
} else if (maxval < 65535) {
avctx->pix_fmt = AV_PIX_FMT_GRAY16;
} else {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
}


Loading…
Cancel
Save