diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-07-20 22:54:27 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-08-04 12:57:38 +0100 |
commit | e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe (patch) | |
tree | 71a7d5f61814d57d240527a14935f0ef8f3b9df1 /libavcodec/pngdec.c | |
parent | 2257165bff243534982f4ddabae4e65e2a35f2ab (diff) | |
download | ffmpeg-e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe.tar.gz |
png: support reading gray+alpha at 16 bits
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 0c4c91a612..fa7f7cc0a6 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -500,6 +500,9 @@ static int decode_frame(AVCodecContext *avctx, } else if (s->bit_depth == 8 && s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { avctx->pix_fmt = AV_PIX_FMT_YA8; + } else if (s->bit_depth == 16 && + s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { + avctx->pix_fmt = AV_PIX_FMT_YA16BE; } else { goto fail; } |