We don't want to keep the lock even we return FALSE because not all the
transports have been removed. This could lead into a deadlock.
https://bugzilla.gnome.org/show_bug.cgi?id=737797
goto was_not_joined;
/* all transports must be removed by now */
- g_return_val_if_fail (priv->transports == NULL, FALSE);
+ if (priv->transports != NULL)
+ goto transports_not_removed;
clear_tr_cache (priv);
g_mutex_unlock (&priv->lock);
return TRUE;
}
+transports_not_removed:
+ {
+ GST_ERROR_OBJECT (stream, "can't leave bin (transports not removed)");
+ g_mutex_unlock (&priv->lock);
+ return FALSE;
+ }
}
/**