webrtcbin: fix blocking of receive bin
authorMathieu Duponchelle <mathieu@centricular.com>
Sat, 1 Feb 2020 00:37:08 +0000 (01:37 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Sat, 1 Feb 2020 00:46:57 +0000 (01:46 +0100)
commitf8eef0aba0c67f99e607d2d51fd0412562b6a170
treea99a1a7204123788280b320598dccef80ff934bf
parent115b65d1abd9e7231d40bc31f5c9e75ff8262552
webrtcbin: fix blocking of receive bin

The receive bin should block buffers from reaching dtlsdec before
the dtls connection has started.

While there was code to block its sinkpads until receive_state
was different from BLOCK, nothing was ever setting it to BLOCK
in the first place. This commit corrects this by setting the
initial state to BLOCK, directly in the constructor.

In addition, now that blocking is effective, we want to only
block buffers and buffer lists, as that's what might trigger
errors, we want to still let events and queries go through,
not doing so causes immediate deadlocks when linking the
bin.
ext/webrtc/transportreceivebin.c