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>
This commit is contained in:
Marton Balint 2018-04-19 23:14:24 +02:00
parent 56b081da57
commit 7033654f7f
4 changed files with 5 additions and 3 deletions

View file

@ -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) {