mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
bin: Also don't *unset* element flags if they're in the suppressed flags
Otherwise our bin might lose various flags that were explicitly set on it at arbitrary times.
This commit is contained in:
parent
29c3b8b4d5
commit
c7e0299d24
1 changed files with 8 additions and 4 deletions
12
gst/gstbin.c
12
gst/gstbin.c
|
@ -1665,22 +1665,26 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
|
|||
if (!GST_BIN_IS_NO_RESYNC (bin))
|
||||
bin->priv->structure_cookie++;
|
||||
|
||||
if (is_sink && !othersink) {
|
||||
if (is_sink && !othersink
|
||||
&& !(bin->priv->suppressed_flags & GST_ELEMENT_FLAG_SINK)) {
|
||||
/* we're not a sink anymore */
|
||||
GST_DEBUG_OBJECT (bin, "we removed the last sink");
|
||||
GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_FLAG_SINK);
|
||||
}
|
||||
if (is_source && !othersource) {
|
||||
if (is_source && !othersource
|
||||
&& !(bin->priv->suppressed_flags & GST_ELEMENT_FLAG_SOURCE)) {
|
||||
/* we're not a source anymore */
|
||||
GST_DEBUG_OBJECT (bin, "we removed the last source");
|
||||
GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_FLAG_SOURCE);
|
||||
}
|
||||
if (provides_clock && !otherprovider) {
|
||||
if (provides_clock && !otherprovider
|
||||
&& !(bin->priv->suppressed_flags & GST_ELEMENT_FLAG_PROVIDE_CLOCK)) {
|
||||
/* we're not a clock provider anymore */
|
||||
GST_DEBUG_OBJECT (bin, "we removed the last clock provider");
|
||||
GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_FLAG_PROVIDE_CLOCK);
|
||||
}
|
||||
if (requires_clock && !otherrequirer) {
|
||||
if (requires_clock && !otherrequirer
|
||||
&& !(bin->priv->suppressed_flags & GST_ELEMENT_FLAG_REQUIRE_CLOCK)) {
|
||||
/* we're not a clock requirer anymore */
|
||||
GST_DEBUG_OBJECT (bin, "we removed the last clock requirer");
|
||||
GST_OBJECT_FLAG_UNSET (bin, GST_ELEMENT_FLAG_REQUIRE_CLOCK);
|
||||
|
|
Loading…
Reference in a new issue