Browse Source

pam: Reject 64bpp rgba.

Fixes ticket #883
tags/n0.10
ami_stuff Carl Eugen Hoyos 14 years ago
parent
commit
febf75f3d2
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      libavcodec/pnm.c

+ 6
- 1
libavcodec/pnm.c View File

@@ -125,7 +125,12 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
avctx->pix_fmt = PIX_FMT_RGB48BE; avctx->pix_fmt = PIX_FMT_RGB48BE;
} }
} else if (depth == 4) { } else if (depth == 4) {
avctx->pix_fmt = PIX_FMT_RGB32;
if (maxval < 256) {
avctx->pix_fmt = PIX_FMT_RGB32;
} else {
av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth\n");
return -1;
}
} else { } else {
return -1; return -1;
} }


Loading…
Cancel
Save