Commit a2c88ec9 authored by Seungha Yang's avatar Seungha Yang 🐑
Browse files

avcfg: Fix AVOptionRanges leak

It must be freed with av_opt_freep_ranges as documented.
parent 6ffe685b
Pipeline #14755 passed with stages
in 15 minutes and 42 seconds
......@@ -252,10 +252,12 @@ install_opts (GObjectClass * gobject_class, const AVClass ** obj, guint prop_id,
if (g_object_class_find_property (gobject_class, name))
continue;
if (av_opt_query_ranges (&r, obj, opt->name, AV_OPT_SEARCH_FAKE_OBJ) >= 0
&& r->nb_ranges == 1) {
min = r->range[0]->value_min;
max = r->range[0]->value_max;
if (av_opt_query_ranges (&r, obj, opt->name, AV_OPT_SEARCH_FAKE_OBJ) >= 0) {
if (r->nb_ranges == 1) {
min = r->range[0]->value_min;
max = r->range[0]->value_max;
}
av_opt_freep_ranges (&r);
}
help = g_strdup_printf ("%s%s", opt->help, extra_help);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment