Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2022-11-12 12:04:39 +0300
committerEdward Hervey <bilboed@bilboed.com>2022-11-12 12:33:51 +0300
commit45e8137e6e648c965b6e10b2048a271dd15127a7 (patch)
tree23602f34048ed33b68cf0a98ca32a44e7059eb6b
parenta301c92ca30efa460f57c5e3a323ae353439d2e5 (diff)
uritranscodebin: Don't leak uris, profile, sinkpad and filters
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>
-rw-r--r--subprojects/gst-plugins-bad/gst/transcode/gsturitranscodebin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-bad/gst/transcode/gsturitranscodebin.c b/subprojects/gst-plugins-bad/gst/transcode/gsturitranscodebin.c
index 9e42856114..eae77a3247 100644
--- a/subprojects/gst-plugins-bad/gst/transcode/gsturitranscodebin.c
+++ b/subprojects/gst-plugins-bad/gst/transcode/gsturitranscodebin.c
@@ -225,6 +225,7 @@ transcodebin_pad_added_cb (GstElement * transcodebin, GstPad * pad,
sinkpad);
/* Let `pad unlinked` error pop up later */
}
+ gst_object_unref (sinkpad);
}
static gboolean
@@ -506,6 +507,9 @@ gst_uri_transcode_bin_dispose (GObject * object)
g_clear_object (&self->video_filter);
g_clear_object (&self->audio_filter);
g_clear_object (&self->cpu_clock);
+ g_free (self->source_uri);
+ g_free (self->dest_uri);
+ gst_clear_object (&self->profile);
G_OBJECT_CLASS (gst_uri_transcode_bin_parent_class)->dispose (object);
}
@@ -599,11 +603,13 @@ gst_uri_transcode_bin_set_property (GObject * object,
break;
case PROP_AUDIO_FILTER:
GST_OBJECT_LOCK (self);
+ gst_object_unref (self->audio_filter);
self->audio_filter = g_value_dup_object (value);
GST_OBJECT_UNLOCK (self);
break;
case PROP_VIDEO_FILTER:
GST_OBJECT_LOCK (self);
+ gst_object_unref (self->video_filter);
self->video_filter = g_value_dup_object (value);
GST_OBJECT_UNLOCK (self);
break;