summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-plugins/gst-plugins-libav/files/AVOptionsRanges-leak-fix.patch')
-rw-r--r--media-plugins/gst-plugins-libav/files/AVOptionsRanges-leak-fix.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/media-plugins/gst-plugins-libav/files/AVOptionsRanges-leak-fix.patch b/media-plugins/gst-plugins-libav/files/AVOptionsRanges-leak-fix.patch
new file mode 100644
index 00000000000..5594dbc1ab8
--- /dev/null
+++ b/media-plugins/gst-plugins-libav/files/AVOptionsRanges-leak-fix.patch
@@ -0,0 +1,34 @@
+From a2c88ec9dadf4a6d7f5f7b16feb2c5c2e155d72d Mon Sep 17 00:00:00 2001
+From: Seungha Yang <seungha.yang@navercorp.com>
+Date: Sun, 13 Jan 2019 00:46:50 +0900
+Subject: [PATCH] avcfg: Fix AVOptionRanges leak
+
+It must be freed with av_opt_freep_ranges as documented.
+---
+ ext/libav/gstavcfg.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c
+index 9236078..9d34462 100644
+--- a/ext/libav/gstavcfg.c
++++ b/ext/libav/gstavcfg.c
+@@ -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);
+--
+2.17.0
+