Revert "pad: Return FALSE if pushing of sticky events failed"
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 2 Jun 2012 18:01:01 +0000 (20:01 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 2 Jun 2012 18:06:39 +0000 (20:06 +0200)
This reverts commit 0f924b922c712059d7752fc15b832551745ff27e.

Sticky events should always return TRUE when pushing and will
only cause failures during data flow later.

gst/gstpad.c

index 79bbb2e..ad44d83 100644 (file)
@@ -4447,7 +4447,7 @@ idle_probe_stopped:
 gboolean
 gst_pad_push_event (GstPad * pad, GstEvent * event)
 {
-  gboolean res = TRUE;
+  gboolean res;
   GstPadProbeType type;
   gboolean sticky, serialized;
 
@@ -4487,13 +4487,12 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
      * sticky events */
     res = (check_sticky (pad) == GST_FLOW_OK);
   }
-
-  /* If pushing sticky events did not fail and this is no sticky event
-   * push it right away */
-  if (res && !sticky) {
+  if (!sticky) {
+    /* other events are pushed right away */
     res = (gst_pad_push_event_unchecked (pad, event, type) == GST_FLOW_OK);
   } else {
     gst_event_unref (event);
+    res = TRUE;
   }
   GST_OBJECT_UNLOCK (pad);