GST_DEBUG ("Cleaning up");
gst_bus_set_flushing (dc->priv->bus, TRUE);
+
+ DISCO_LOCK (dc);
+ if (dc->priv->current_error) {
+ g_error_free (dc->priv->current_error);
+ DISCO_UNLOCK (dc);
+ gst_element_set_state ((GstElement *) dc->priv->pipeline, GST_STATE_NULL);
+ } else {
+ DISCO_UNLOCK (dc);
+ }
+
gst_element_set_state ((GstElement *) dc->priv->pipeline, GST_STATE_READY);
gst_bus_set_flushing (dc->priv->bus, FALSE);
DISCO_LOCK (dc);
- if (dc->priv->current_error)
- g_error_free (dc->priv->current_error);
dc->priv->current_error = NULL;
if (dc->priv->current_topology) {
gst_structure_free (dc->priv->current_topology);