mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 03:30:35 +00:00
debugutils: Only proxy the properties once
The needed once call was removed accidently during porting. This was catch by the CI as memory leaks. Related to !2426 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2438>
This commit is contained in:
parent
b3504a0192
commit
03041842de
2 changed files with 26 additions and 2 deletions
|
@ -62,6 +62,18 @@ G_DEFINE_TYPE_WITH_CODE (GstFakeAudioSink, gst_fake_audio_sink, GST_TYPE_BIN,
|
|||
GST_ELEMENT_REGISTER_DEFINE (fakeaudiosink, "fakeaudiosink",
|
||||
GST_RANK_NONE, gst_fake_audio_sink_get_type ());
|
||||
|
||||
static void
|
||||
gst_fake_audio_sink_proxy_properties (GstFakeAudioSink * self,
|
||||
GstElement * child)
|
||||
{
|
||||
static gsize initialized = 0;
|
||||
|
||||
if (g_once_init_enter (&initialized)) {
|
||||
gst_fake_sink_proxy_properties (GST_ELEMENT_CAST (self), child, PROP_LAST);
|
||||
g_once_init_leave (&initialized, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_fake_audio_sink_init (GstFakeAudioSink * self)
|
||||
{
|
||||
|
@ -89,7 +101,7 @@ gst_fake_audio_sink_init (GstFakeAudioSink * self)
|
|||
|
||||
self->child = child;
|
||||
|
||||
gst_fake_sink_proxy_properties (GST_ELEMENT_CAST (self), child, PROP_LAST);
|
||||
gst_fake_audio_sink_proxy_properties (self, child);
|
||||
} else {
|
||||
g_warning ("Check your GStreamer installation, "
|
||||
"core element 'fakesink' is missing.");
|
||||
|
|
|
@ -127,6 +127,18 @@ gst_fake_video_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_fake_video_sink_proxy_properties (GstFakeVideoSink * self,
|
||||
GstElement * child)
|
||||
{
|
||||
static gsize initialized = 0;
|
||||
|
||||
if (g_once_init_enter (&initialized)) {
|
||||
gst_fake_sink_proxy_properties (GST_ELEMENT_CAST (self), child, PROP_LAST);
|
||||
g_once_init_leave (&initialized, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_fake_video_sink_init (GstFakeVideoSink * self)
|
||||
{
|
||||
|
@ -157,7 +169,7 @@ gst_fake_video_sink_init (GstFakeVideoSink * self)
|
|||
|
||||
self->child = child;
|
||||
|
||||
gst_fake_sink_proxy_properties (GST_ELEMENT_CAST (self), child, PROP_LAST);
|
||||
gst_fake_video_sink_proxy_properties (self, child);
|
||||
} else {
|
||||
g_warning ("Check your GStreamer installation, "
|
||||
"core element 'fakesink' is missing.");
|
||||
|
|
Loading…
Reference in a new issue