avfilter/vf_scale: don't expose framesync options in vf_scale2ref

It doesn't use them.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-05-05 10:59:25 -03:00
parent f8a613d6a8
commit eb392e4100
1 changed files with 27 additions and 2 deletions

View File

@ -1228,7 +1228,7 @@ static const AVOption scale_options[] = {
};
static const AVClass scale_class = {
.class_name = "scale(2ref)",
.class_name = "scale",
.item_name = av_default_item_name,
.option = scale_options,
.version = LIBAVUTIL_VERSION_INT,
@ -1268,6 +1268,31 @@ const AVFilter ff_vf_scale = {
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
};
static const AVClass *scale2ref_child_class_iterate(void **iter)
{
const AVClass *c = *iter ? NULL : sws_get_class();
*iter = (void*)(uintptr_t)c;
return c;
}
static void *scale2ref_child_next(void *obj, void *prev)
{
ScaleContext *s = obj;
if (!prev)
return s->sws_opts;
return NULL;
}
static const AVClass scale2ref_class = {
.class_name = "scale(2ref)",
.item_name = av_default_item_name,
.option = scale_options,
.version = LIBAVUTIL_VERSION_INT,
.category = AV_CLASS_CATEGORY_FILTER,
.child_class_iterate = scale2ref_child_class_iterate,
.child_next = scale2ref_child_next,
};
static const AVFilterPad avfilter_vf_scale2ref_inputs[] = {
{
.name = "default",
@ -1303,7 +1328,7 @@ const AVFilter ff_vf_scale2ref = {
.init = init,
.uninit = uninit,
.priv_size = sizeof(ScaleContext),
.priv_class = &scale_class,
.priv_class = &scale2ref_class,
FILTER_INPUTS(avfilter_vf_scale2ref_inputs),
FILTER_OUTPUTS(avfilter_vf_scale2ref_outputs),
FILTER_QUERY_FUNC(query_formats),