mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
GESTimelinePipeline: Properly release playsink and encodebin
This commit is contained in:
parent
87087b013a
commit
6fe60cb694
1 changed files with 11 additions and 1 deletions
|
@ -61,9 +61,19 @@ ges_timeline_pipeline_dispose (GObject * object)
|
||||||
if (self->playsink) {
|
if (self->playsink) {
|
||||||
if (self->mode & (TIMELINE_MODE_PREVIEW))
|
if (self->mode & (TIMELINE_MODE_PREVIEW))
|
||||||
gst_bin_remove (GST_BIN (object), self->playsink);
|
gst_bin_remove (GST_BIN (object), self->playsink);
|
||||||
gst_object_unref (self->playsink);
|
else
|
||||||
|
gst_object_unref (self->playsink);
|
||||||
self->playsink = NULL;
|
self->playsink = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->encodebin) {
|
||||||
|
if (self->mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER))
|
||||||
|
gst_bin_remove (GST_BIN (object), self->encodebin);
|
||||||
|
else
|
||||||
|
gst_object_unref (self->encodebin);
|
||||||
|
self->encodebin = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (ges_timeline_pipeline_parent_class)->dispose (object);
|
G_OBJECT_CLASS (ges_timeline_pipeline_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue