webrtc: In all blocking pad probes except for sink pads also handle serialized events
authorSebastian Dröge <sebastian@centricular.com>
Thu, 6 Feb 2020 12:29:13 +0000 (14:29 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 11 Feb 2020 00:49:51 +0000 (00:49 +0000)
commit4ffa6350e8d42323fd476bd1b01f58898fbbaf49
tree4bf19176e3b993ab1cd0b52b1842c210011d6fdf
parentc16d4d2c33e4af301110897634414fc878b76481
webrtc: In all blocking pad probes except for sink pads also handle serialized events

Otherwise it can happen that e.g. the stream-start event is tried to be
sent as part of pushing the first buffer. Downstream might not be in
PAUSED/PLAYING yet, so the event is rejected with GST_FLOW_FLUSHING and
because it's an event would not cause the blocking pad probe to trigger
first. This would then return GST_FLOW_FLUSHING for the buffer and shut
down all of upstream.

To solve this we return GST_PAD_PROBE_DROP for all events. In case of
sticky events they would be resent again later once we unblocked after
blocking on the buffer and everything works fine.

Don't handle events specifically in sink pad blocking pad probes as here
downstream is not linked yet and we are actually waiting for the
following CAPS event before unblocking can happen.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1172
ext/webrtc/gstwebrtcbin.c
ext/webrtc/transportreceivebin.c
ext/webrtc/transportsendbin.c