+2007-10-09 Wim Taymans <wim.taymans@gmail.com>
+
+ * gst/gstbin.c: (remove_from_queue):
+ Work around a problem with pipelines containing (semi)loops until a
+ proper, more complicated solution is ready. See #475455.
+
2007-10-09 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstplugin.c:
static void
remove_from_queue (GstBinSortIterator * bit, GstElement * element)
{
- GST_DEBUG_OBJECT (bit->bin, "removing '%s' from queue",
- GST_ELEMENT_NAME (element));
- g_queue_remove (bit->queue, element);
- gst_object_unref (element);
+ GList *find;
+
+ if ((find = g_queue_find (bit->queue, element))) {
+ GST_DEBUG_OBJECT (bit->bin, "removing '%s' from queue",
+ GST_ELEMENT_NAME (element));
+
+ g_queue_delete_link (bit->queue, find);
+ gst_object_unref (element);
+ } else {
+ GST_DEBUG_OBJECT (bit->bin, "unable to remove '%s' from queue",
+ GST_ELEMENT_NAME (element));
+ }
}
/* clear the queue, unref all objects as we took a ref when