|
|
@ -149,14 +149,16 @@ static av_cold int init(AVFilterContext *ctx) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static int query_formats(AVFilterContext *ctx) |
|
|
|
static int query_formats(const AVFilterContext *ctx, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_in, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_out) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FormatContext *s = ctx->priv; |
|
|
|
FormatContext *s = ctx->priv; |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
|
if (s->formats && (ret = ff_set_common_formats(ctx, s->formats)) < 0 || |
|
|
|
if (s->formats && (ret = ff_set_common_formats2 (ctx, cfg_in, cfg_out, s->formats)) < 0 || |
|
|
|
s->color_spaces && (ret = ff_set_common_color_spaces(ctx, s->color_spaces)) < 0 || |
|
|
|
s->color_spaces && (ret = ff_set_common_color_spaces2(ctx, cfg_in, cfg_out, s->color_spaces)) < 0 || |
|
|
|
s->color_ranges && (ret = ff_set_common_color_ranges(ctx, s->color_ranges)) < 0) |
|
|
|
s->color_ranges && (ret = ff_set_common_color_ranges2(ctx, cfg_in, cfg_out, s->color_ranges)) < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
@ -197,7 +199,7 @@ const AVFilter ff_vf_format = { |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_OUTPUTS(ff_video_default_filterpad), |
|
|
|
FILTER_OUTPUTS(ff_video_default_filterpad), |
|
|
|
|
|
|
|
|
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
}; |
|
|
|
}; |
|
|
|
#endif /* CONFIG_FORMAT_FILTER */ |
|
|
|
#endif /* CONFIG_FORMAT_FILTER */ |
|
|
|
|
|
|
|
|
|
|
@ -217,6 +219,6 @@ const AVFilter ff_vf_noformat = { |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_OUTPUTS(ff_video_default_filterpad), |
|
|
|
FILTER_OUTPUTS(ff_video_default_filterpad), |
|
|
|
|
|
|
|
|
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
}; |
|
|
|
}; |
|
|
|
#endif /* CONFIG_NOFORMAT_FILTER */ |
|
|
|
#endif /* CONFIG_NOFORMAT_FILTER */ |
|
|
|