mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
audio-source: unref private capsfilter reference on dispose
Otherwise a capsfilter reference will be leaked since it has been got using gst_bin_get_by_name. https://bugzilla.gnome.org/show_bug.cgi?id=766524
This commit is contained in:
parent
4f8459b487
commit
991870fa28
1 changed files with 15 additions and 0 deletions
|
@ -166,14 +166,29 @@ ges_audio_source_create_element (GESTrackElement * trksrc)
|
||||||
return topbin;
|
return topbin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ges_audio_source_dispose (GObject * object)
|
||||||
|
{
|
||||||
|
GESAudioSource *self = GES_AUDIO_SOURCE (object);
|
||||||
|
|
||||||
|
if (self->priv->capsfilter) {
|
||||||
|
gst_object_unref (self->priv->capsfilter);
|
||||||
|
self->priv->capsfilter = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (ges_audio_source_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_audio_source_class_init (GESAudioSourceClass * klass)
|
ges_audio_source_class_init (GESAudioSourceClass * klass)
|
||||||
{
|
{
|
||||||
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
|
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
|
||||||
GESAudioSourceClass *audio_source_class = GES_AUDIO_SOURCE_CLASS (klass);
|
GESAudioSourceClass *audio_source_class = GES_AUDIO_SOURCE_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GESAudioSourcePrivate));
|
g_type_class_add_private (klass, sizeof (GESAudioSourcePrivate));
|
||||||
|
|
||||||
|
gobject_class->dispose = ges_audio_source_dispose;
|
||||||
track_class->nleobject_factorytype = "nlesource";
|
track_class->nleobject_factorytype = "nlesource";
|
||||||
track_class->create_element = ges_audio_source_create_element;
|
track_class->create_element = ges_audio_source_create_element;
|
||||||
audio_source_class->create_source = NULL;
|
audio_source_class->create_source = NULL;
|
||||||
|
|
Loading…
Reference in a new issue