+2007-07-18 Jan Schmidt <thaytan@noraisin.net>
+
+ * gst/gstbin.c: (gst_bin_continue_func):
+ Check that the state_cookie hasn't changed since the continue_func
+ was scheduled. Avoids problems where the state changes back to
+ something it shouldn't be because it was changed in the meantime.
+
2007-07-17 Stefan Kost <ensonic@users.sf.net>
* gst/gstregistrybinary.c: (gst_registry_binary_save_const_string),
GST_DEBUG_OBJECT (bin, "doing state continue");
GST_OBJECT_LOCK (bin);
+ if (data->cookie != GST_ELEMENT_CAST (bin)->state_cookie)
+ goto interrupted;
+
current = GST_STATE (bin);
next = GST_STATE_GET_NEXT (current, pending);
transition = (GstStateChange) GST_STATE_TRANSITION (current, next);
GST_DEBUG_OBJECT (bin, "state continue done");
gst_object_unref (bin);
g_free (data);
+ return;
+
+interrupted:
+ GST_OBJECT_UNLOCK (bin);
+ GST_STATE_UNLOCK (bin);
+ GST_DEBUG_OBJECT (bin, "state continue aborted due to intervening change");
+ gst_object_unref (bin);
+ g_free (data);
}
static GstBusSyncReply