Commit d07b0d99 authored by Paul B Mahol's avatar Paul B Mahol

swscale: check flags instead of nb_components to find if pixel format have alpha

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 7003d650
......@@ -688,7 +688,7 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return desc->nb_components == 2 || desc->nb_components == 4;
return desc->flags & PIX_FMT_ALPHA;
}
#if 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment