mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
playsink: Don't set sink to NULL if a new one is set while the old one is still in use
This commit is contained in:
parent
a2ebeb8357
commit
61c1d15ce7
1 changed files with 2 additions and 1 deletions
|
@ -842,7 +842,8 @@ gst_play_sink_set_sink (GstPlaySink * playsink, GstPlaySinkType type,
|
|||
GST_PLAY_SINK_UNLOCK (playsink);
|
||||
|
||||
if (old) {
|
||||
if (old != sink)
|
||||
/* Set the old sink to NULL if it is not used any longer */
|
||||
if (old != sink && !GST_OBJECT_PARENT (old))
|
||||
gst_element_set_state (old, GST_STATE_NULL);
|
||||
gst_object_unref (old);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue