aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-01-24 17:32:37 +0000
committerPaul B Mahol <onemda@gmail.com>2013-01-25 13:06:00 +0000
commitd07b0d992736e01006caa64b87d996f902d357db (patch)
tree3b6da0e1233ae3874d37f0fd3fcc67b7968655b0
parent7003d650b0751c665ef8f6b62e8c01646f432599 (diff)
downloadffmpeg-d07b0d992736e01006caa64b87d996f902d357db.tar.gz
swscale: check flags instead of nb_components to find if pixel format have alpha
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libswscale/swscale_internal.h2
1 files changed, 1 insertions, 1 deletions
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