mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swscale: check flags instead of nb_components to find if pixel format have alpha
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
7003d650b0
commit
d07b0d9927
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user