diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-06-24 11:34:02 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-08-13 19:58:40 +0200 |
commit | a05c6e8c11b1a17b7c4529294751b917cf0d8e04 (patch) | |
tree | 80b376c24ed97c59da803892027683bd59ada5fc /libavcodec | |
parent | d34a133b78afe2793cd8537f3c7f42437f441e94 (diff) | |
download | ffmpeg-streaming-a05c6e8c11b1a17b7c4529294751b917cf0d8e04.zip ffmpeg-streaming-a05c6e8c11b1a17b7c4529294751b917cf0d8e04.tar.gz |
xwddec: support 8bpp grayscale
(cherry picked from commit b9c94e826e7551027754ecfa60e3e487e0c28fcb)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/xwddec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 387b697..c43724e 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -155,10 +155,12 @@ 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 || bpp != pixdepth) return AVERROR_INVALIDDATA; if (pixdepth == 1) avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; + else if (pixdepth == 8) + avctx->pix_fmt = AV_PIX_FMT_GRAY8; break; case XWD_STATIC_COLOR: case XWD_PSEUDO_COLOR: |