diff options
author | Marton Balint <cus@passwd.hu> | 2018-04-19 23:14:24 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-04-30 21:51:31 +0200 |
commit | 7033654f7f3c6663c9b5005b87fc06c29075244d (patch) | |
tree | 3b27c9b0c654a5f78a0e0cc23b3a46108405a242 /fftools | |
parent | 56b081da578f87aed804b44e539f6e5345f3049a (diff) | |
download | ffmpeg-7033654f7f3c6663c9b5005b87fc06c29075244d.tar.gz |
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 'fftools')
-rw-r--r-- | fftools/ffmpeg_filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 877fd670e6..068f499e0b 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -65,6 +65,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCod if (codec && codec->pix_fmts) { const enum AVPixelFormat *p = codec->pix_fmts; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target); + //FIXME: This should check for AV_PIX_FMT_FLAG_ALPHA after PAL8 pixel format without alpha is implemented int has_alpha = desc ? desc->nb_components % 2 == 0 : 0; enum AVPixelFormat best= AV_PIX_FMT_NONE; |