diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 66a59ae8bd..92dc25a833 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -655,6 +655,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 { av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d " "and color type %d\n",