summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-17 00:37:20 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-17 00:42:17 +0100
commit328e79329af80977451b501a2880f016ba0801e2 (patch)
tree1993aa346e2eff43c479759e3d4edabfba585c6c /libavcodec/pnm.c
parentdc2f652ae4ca4e4093b6a90d82b09e0545b84c7f (diff)
downloadffmpeg-328e79329af80977451b501a2880f016ba0801e2.tar.gz
Support gray8a pam decoding.
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index fa43c8d6e9..1defbc20e6 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -118,6 +118,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
} else {
avctx->pix_fmt = PIX_FMT_GRAY16BE;
}
+ } else if (depth == 2) {
+ if (maxval == 255)
+ avctx->pix_fmt = PIX_FMT_GRAY8A;
} else if (depth == 3) {
if (maxval < 256) {
avctx->pix_fmt = PIX_FMT_RGB24;