summaryrefslogtreecommitdiffstats
path: root/libavcodec/dds.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-04-01 15:11:50 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-04-06 12:13:49 -0400
commit02538636261fdec9c70f4185b23147c636f269b4 (patch)
treef4be41f5ba7f023793c7357106fd58ab8b9f4117 /libavcodec/dds.c
parent9a9fb710bcf4657e030467cfe2556cb0e2c01afc (diff)
downloadffmpeg-streaming-02538636261fdec9c70f4185b23147c636f269b4.zip
ffmpeg-streaming-02538636261fdec9c70f4185b23147c636f269b4.tar.gz
dds: Add support for alpha-only files
Due to how pixel format conversion is done, they behave the same way as gray files. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/dds.c')
-rw-r--r--libavcodec/dds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 0e9d9b9..caa629a 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -352,6 +352,8 @@ static int parse_pixel_format(AVCodecContext *avctx)
/* 8 bpp */
if (bpp == 8 && r == 0xff && g == 0 && b == 0 && a == 0)
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+ else if (bpp == 8 && r == 0 && g == 0 && b == 0 && a == 0xff)
+ avctx->pix_fmt = AV_PIX_FMT_GRAY8;
/* 16 bpp */
else if (bpp == 16 && r == 0xff && g == 0 && b == 0 && a == 0xff00)
avctx->pix_fmt = AV_PIX_FMT_YA8;
OpenPOWER on IntegriCloud