playsink: make sure we remain a sink

When we remove our elements, we could lose our sink flag. Make sure we remain a
sink by setting the flag again after removing elements.
This commit is contained in:
Wim Taymans 2009-11-17 16:37:57 +01:00
parent bbb531619c
commit 65773b58dd

View file

@ -720,8 +720,11 @@ add_chain (GstPlayChain * chain, gboolean add)
if (add)
gst_bin_add (GST_BIN_CAST (chain->playsink), chain->bin);
else
else {
gst_bin_remove (GST_BIN_CAST (chain->playsink), chain->bin);
/* we don't want to lose our sink status */
GST_OBJECT_FLAG_SET (chain->playsink, GST_ELEMENT_IS_SINK);
}
chain->added = add;