collectpads: Forward seek events to the peer directly
authorMathieu Duponchelle <mduponchelle1@gmail.com>
Sun, 16 Feb 2014 19:35:09 +0000 (20:35 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 16 Mar 2014 16:47:38 +0000 (17:47 +0100)
Taken from the adder seek handling code.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726461

libs/gst/base/gstcollectpads.c

index c501208..3b67b37 100644 (file)
@@ -1859,8 +1859,13 @@ typedef struct
 static gboolean
 event_forward_func (GstPad * pad, EventData * data)
 {
-  data->result &= gst_pad_push_event (pad, gst_event_ref (data->event));
+  gboolean ret = TRUE;
+  GstPad *peer = gst_pad_get_peer (pad);
 
+  if (peer)
+    ret = gst_pad_send_event (peer, gst_event_ref (data->event));
+
+  data->result &= ret;
   /* Always send to all pads */
   return FALSE;
 }