From d07b0d992736e01006caa64b87d996f902d357db Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 24 Jan 2013 17:32:37 +0000 Subject: swscale: check flags instead of nb_components to find if pixel format have alpha Signed-off-by: Paul B Mahol --- libswscale/swscale_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale/swscale_internal.h') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index d1f9539246..4f4b9531ee 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -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 -- cgit v1.2.3