[gstreamer-bugs] [Bug 475455] element destroyed from scheduler

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Sep 18 04:54:23 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=475455

  GStreamer | gstreamer (core) | Ver: HEAD CVS




------- Comment #11 from Laurent Glayal  2007-09-18 11:54 UTC -------
A quick and dirty patch could be this one :

static void
remove_from_queue (GstBinSortIterator * bit, GstElement * element)
{
  if (g_queue_find(bit->queue, element)) {
      GST_DEBUG_OBJECT (bit->bin, "removing '%s' from queue",
          GST_ELEMENT_NAME (element));
      g_queue_remove (bit->queue, element);
      gst_object_unref (element);
  } else {
      GST_DEBUG_OBJECT (bit->bin, "unable to remove '%s' from queue - not
inserted",
          GST_ELEMENT_NAME (element));
  }
}

that is quite unefficient as we scan all the queue for all elements.
A more efficient solution could be to use the result of the g_queue_find to
issue a remove with a g_queue_delete_link().

But it's just a workaround.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=475455.




More information about the Gstreamer-bugs mailing list