diff options
author | James Almer <jamrial@gmail.com> | 2024-05-05 10:59:25 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-05-05 21:37:07 -0300 |
commit | eb392e41004c825551693d84db24666853950e4b (patch) | |
tree | 519567ee31178f78e0a90f720c94970ee54397e4 /libavfilter | |
parent | f8a613d6a86f1f2875cbebc8f1f60cfe39256fd1 (diff) | |
download | ffmpeg-eb392e41004c825551693d84db24666853950e4b.tar.gz |
avfilter/vf_scale: don't expose framesync options in vf_scale2ref
It doesn't use them.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_scale.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 60d301dcd8..07e9025335 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -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), |