GESTimelinePipeline: Only remove the playsink if it was used

This commit is contained in:
Edward Hervey 2010-05-20 12:29:30 +02:00
parent 39a709b6b4
commit a17900813a

View file

@ -59,7 +59,8 @@ ges_timeline_pipeline_finalize (GObject * object)
GESTimelinePipeline *self = GES_TIMELINE_PIPELINE (object);
if (self->playsink) {
gst_bin_remove (GST_BIN (object), self->playsink);
if (self->mode & (TIMELINE_MODE_PREVIEW))
gst_bin_remove (GST_BIN (object), self->playsink);
gst_object_unref (self->playsink);
self->playsink = NULL;
}