sendrecv: wait until the offer is set before creating answer
authorMatthew Waters <matthew@centricular.com>
Fri, 1 May 2020 08:52:33 +0000 (18:52 +1000)
committerMatthew Waters <ystreet00@gmail.com>
Wed, 6 May 2020 06:01:57 +0000 (06:01 +0000)
commit3a86a37c03c9701061abe551ac1d9fb2e38dd610
tree64d35145f5e6132d83bb0f0426f180f5fbf53cfa
parent615813ef93f6a7b977280bd55d6ffd17c25fcbd2
sendrecv: wait until the offer is set before creating answer

Pragmatically, an answer cannot be created until the offer is created as
the answer creation needs information from the offer.  Practically, due
to implementation details, the answer was always queued after the set of
the offer and so the call flow did not matter.

The current code also hid a bug in webrtcbin where ice candidates would be
generated before the answer had been created which is against the JSEP
specification.

Change to the correct call flow for exemplary effect.
webrtc/sendrecv/gst/webrtc-sendrecv.c