summaryrefslogtreecommitdiff
path: root/libavutil/pixdesc.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2018-04-19 23:14:24 +0200
committerMarton Balint <cus@passwd.hu>2018-04-30 21:51:31 +0200
commit7033654f7f3c6663c9b5005b87fc06c29075244d (patch)
tree3b27c9b0c654a5f78a0e0cc23b3a46108405a242 /libavutil/pixdesc.c
parent56b081da578f87aed804b44e539f6e5345f3049a (diff)
Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used
Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and avfiltergraph.c pick_format() until a paletted pixel format without alpha is introduced. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r--libavutil/pixdesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index a8be7b66e6..df03b3372d 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2482,7 +2482,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
#define FF_COLOR_XYZ 4
#define pixdesc_has_alpha(pixdesc) \
- ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
+ ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
static int get_color_type(const AVPixFmtDescriptor *desc) {