1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-09-16 08:36:51 +02:00

avfilter/buffersink: add missing checks for alphamodes

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-09-08 15:07:20 -03:00
parent e9a6b75373
commit 23b759e99e

View File

@@ -181,7 +181,7 @@ static av_cold int common_init(AVFilterContext *ctx)
if (ctx->input_pads[0].type == AVMEDIA_TYPE_VIDEO) {
if ((buf->pixel_fmts_size || buf->color_spaces_size || buf->color_ranges_size || buf->alpha_modes_size) &&
(buf->nb_pixel_formats || buf->nb_colorspaces || buf->nb_colorranges)) {
(buf->nb_pixel_formats || buf->nb_colorspaces || buf->nb_colorranges || buf->nb_alphamodes)) {
av_log(ctx, AV_LOG_ERROR, "Cannot combine old and new format lists\n");
return AVERROR(EINVAL);
}
@@ -400,7 +400,7 @@ static int vsink_query_formats(const AVFilterContext *ctx,
int ret;
#if FF_API_BUFFERSINK_OPTS
if (buf->nb_pixel_formats || buf->nb_colorspaces || buf->nb_colorranges) {
if (buf->nb_pixel_formats || buf->nb_colorspaces || buf->nb_colorranges || buf->nb_alphamodes) {
#endif
if (buf->nb_pixel_formats) {
ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, buf->pixel_formats);