rtpsession: never send on a non-internal source
authorHavard Graff <havard.graff@gmail.com>
Fri, 13 Nov 2020 20:25:42 +0000 (21:25 +0100)
committerHavard Graff <havard.graff@gmail.com>
Fri, 13 Nov 2020 20:35:58 +0000 (21:35 +0100)
commit79748dab2bcb54e49a7401a9507f27993f9f42ad
treeaf9345008f337bc3b5e31db99af77fda8abce9cb
parent97ced29277500b631c13dc71a0a7bbc5fdb1c784
rtpsession: never send on a non-internal source

This will end up as a "received" packet, due to the code in
source_push_rtp, which will think this is a packet being received.

Instead drop the packet and hope that either:
1. Something upstream responds to the GstRTPCollision event and changes
   SSRC used for sending.
2. That the application responds to the "on-ssrc-collision" signal, and
   forces the sender (payloader) to change its SSRC.
3. That the BYE sent to the existing user of this SSRC will respond to
   the BYE, and that we timeout this source, so we can continue sending
   using the chosen SSRC.

The test reproduces a scenario where we previously would have sent
on a non-internal source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/817>
gst/rtpmanager/rtpsession.c
tests/check/elements/rtpsession.c