Making it less random and fixing a race in a GES test where we have
as pipeline:
```
videotestsrc ! output-selector name=s ! input-selector name=i s. ! timecodestamper ! i.
```
which we seek, leading to the seek reaching the video testsrc
without going through the timecodestamper and generating a buffer
even before timecodestamper gets the seek which means that its internal
state is wrong compared to the datastream it gets and attaches wrong
timecode metas.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/485>
/* Send upstream events to all sinkpads */
iter = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (sel));
+ GST_INPUT_SELECTOR_LOCK (sel);
+ eventpad = gst_input_selector_get_active_sinkpad (sel);
+ if (eventpad) {
+ gst_object_ref (eventpad);
+ GST_INPUT_SELECTOR_UNLOCK (sel);
+
+ gst_event_ref (event);
+ result |= gst_pad_push_event (eventpad, event);
+ pushed_pads = g_list_append (pushed_pads, eventpad);
+ gst_object_unref (eventpad);
+ } else {
+ GST_INPUT_SELECTOR_UNLOCK (sel);
+ }
+
/* This is now essentially a copy of gst_pad_event_default_dispatch
* with a different iterator */
while (!done) {