summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index be831ddbc0..a3b4919261 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -135,9 +135,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s){
s->maxval = atoi(buf1);
if (s->maxval >= 256) {
if (avctx->pix_fmt == PIX_FMT_GRAY8) {
- avctx->pix_fmt = PIX_FMT_GRAY16BE;
- if (s->maxval != 65535)
- avctx->pix_fmt = PIX_FMT_GRAY16;
+ avctx->pix_fmt = PIX_FMT_GRAY16BE;
+ if (s->maxval != 65535)
+ avctx->pix_fmt = PIX_FMT_GRAY16;
} else {
av_log(avctx, AV_LOG_ERROR, "16-bit components are only supported for grayscale\n");
avctx->pix_fmt = PIX_FMT_NONE;