diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-19 05:56:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-19 16:26:46 +0100 |
commit | d9b3097ba2d4b215b95481dcd92ce88b4ffae6da (patch) | |
tree | 383e91b3e9a09fdaa9ad981736153a8a8082213e /libavcodec/pnm.c | |
parent | 3fa6d205338c2c019eb024e9b79b5b07c2d72dbb (diff) | |
download | ffmpeg-d9b3097ba2d4b215b95481dcd92ce88b4ffae6da.tar.gz |
pamdec: fix mono support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r-- | libavcodec/pnm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 103408cad6..0e547deb5f 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -112,7 +112,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) s->maxval = maxval; if (depth == 1) { if (maxval == 1) { - avctx->pix_fmt = PIX_FMT_MONOWHITE; + avctx->pix_fmt = PIX_FMT_MONOBLACK; } else if (maxval == 255) { avctx->pix_fmt = PIX_FMT_GRAY8; } else { @@ -148,7 +148,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) avctx->height = atoi(buf1); if(avctx->height <= 0 || av_image_check_size(avctx->width, avctx->height, 0, avctx)) return -1; - if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { + if (avctx->pix_fmt != PIX_FMT_MONOWHITE && avctx->pix_fmt != PIX_FMT_MONOBLACK) { pnm_get(s, buf1, sizeof(buf1)); s->maxval = atoi(buf1); if (s->maxval <= 0) { |