gst/gstbin.c: Work around a problem with pipelines containing (semi)loops until a proper, more complicated solution i...

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2007-10-09 16:20:59 +00:00
parent a90dc9f01a
commit 9d731d1e11
2 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,9 @@
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:

View file

@ -1588,10 +1588,18 @@ add_to_queue (GstBinSortIterator * bit, GstElement * element)
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