[Bug 659571] basetransform: delay events we cannot send right away

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Sep 20 05:12:43 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=659571
  GStreamer | gstreamer (core) | unspecified

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #197041|none                        |needs-work
             status|                            |

--- Comment #2 from Sebastian Dröge <slomo at circular-chaos.org> 2011-09-20 12:12:38 UTC ---
Review of attachment 197041:
 --> (https://bugzilla.gnome.org/review?bug=659571&attachment=197041)

::: libs/gst/base/gstbasetransform.c
@@ +368,3 @@
+    GList *tmp;
+    for (tmp = trans->priv->delayed_events; tmp; tmp = tmp->next)
+      gst_event_unref (tmp->data);

g_list_foreach (trans->priv->delayed_events, (GFunc) gst_event_unref, NULL)

@@ +2054,3 @@
+  while (1) {
+    GST_OBJECT_LOCK (trans);
+    tmp = trans->priv->delayed_events;

Just get the list, set trans->priv->delayed_events to NULL, release the lock
and then push all events. That's a bit easier

@@ +2097,3 @@
+
+    /* We ref the event to avoid it being dumped if it fails to be forwarded,
+       as we want to keep it for later if so */

This is wrong, you should only delay the events if they're
GST_EVENT_IS_SERIALIZED() and if the srcpad caps are NULL. If it fails in other
situations we really don't care. Also FLUSH_STOP events should never be delayed
but result in dropping all previously delayed events and EOS should be
immediately forwarded too.

Also drop all delayed events when going PAUSED->READY

@@ +2546,3 @@
       trans->priv->processed++;
+
+      gst_base_transform_send_delayed_events (trans);

Make sure that we definitely have srcpad caps at this point... just check the
code above but iirc that's the case here

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list