summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst/playback/gstplaysink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
index 9854dd6a..ac70c68e 100644
--- a/gst/playback/gstplaysink.c
+++ b/gst/playback/gstplaysink.c
@@ -445,8 +445,11 @@ gst_play_sink_set_sink (GstPlaySink * playsink, GstPlaySinkType type,
}
GST_PLAY_SINK_UNLOCK (playsink);
- if (old)
+ if (old) {
+ if (old != sink)
+ gst_element_set_state (old, GST_STATE_NULL);
gst_object_unref (old);
+ }
}
GstElement *