diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-06-24 11:34:02 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-06-24 11:34:02 +0000 |
commit | b9c94e826e7551027754ecfa60e3e487e0c28fcb (patch) | |
tree | 8d32b742936856f18945d9729110d38e86d577f4 /libavcodec/xwddec.c | |
parent | 244682dd086233b71e885d2fb1ec0dd3396b94bc (diff) | |
download | ffmpeg-b9c94e826e7551027754ecfa60e3e487e0c28fcb.tar.gz |
xwddec: support 8bpp grayscale
Diffstat (limited to 'libavcodec/xwddec.c')
-rw-r--r-- | libavcodec/xwddec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 2879358aa4..e6d4df4797 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -157,10 +157,13 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, switch (vclass) { case XWD_STATIC_GRAY: case XWD_GRAY_SCALE: - if (bpp != 1) + if (bpp != 1 && bpp != 8) return AVERROR_INVALIDDATA; - if (pixdepth == 1) + if (pixdepth == 1) { avctx->pix_fmt = PIX_FMT_MONOWHITE; + } else if (pixdepth == 8) { + avctx->pix_fmt = PIX_FMT_GRAY8; + } break; case XWD_STATIC_COLOR: case XWD_PSEUDO_COLOR: |