While making some tests between pion and Janus we found out that in some circumstances Janus could ignore incoming RTCP due to unrecognized SSRCs.
That happens when Janus receives RTCP Receiver Reports in connections where sources have unknown remote SSRCs (e.g. recvonly connections). Pion picks a random SSRC as sender SSRC and puts the remote media SSRC in the media header of the packet.
When Janus receives a RTCP packets from sources with unknown remote SSRCs, it parses the SSRC through janus_rtcp_get_sender_ssrc, that basically reads the sender SSRC (in this case a random one, hence dropping the packet).
In this PR we try to add a fallback mechanism to read also from media SSRC through janus_rtcp_get_receiver_ssrc in case the SSRC read from janus_rtcp_get_sender_ssrc is not recognized.
While making some tests between pion and Janus we found out that in some circumstances Janus could ignore incoming RTCP due to unrecognized SSRCs.
That happens when Janus receives RTCP Receiver Reports in connections where sources have unknown remote SSRCs (e.g. recvonly connections). Pion picks a random SSRC as sender SSRC and puts the remote media SSRC in the media header of the packet.
When Janus receives a RTCP packets from sources with unknown remote SSRCs, it parses the SSRC through
janus_rtcp_get_sender_ssrc
, that basically reads the sender SSRC (in this case a random one, hence dropping the packet).In this PR we try to add a fallback mechanism to read also from media SSRC through
janus_rtcp_get_receiver_ssrc
in case the SSRC read fromjanus_rtcp_get_sender_ssrc
is not recognized.