avcfg: Fix AVOptionRanges leak

It must be freed with av_opt_freep_ranges as documented.
This commit is contained in:
Seungha Yang 2019-01-13 00:46:50 +09:00
parent 6ffe685b89
commit a2c88ec9da

View file

@ -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);