Resolved: Firefox shows up as Black Screen

Hi,

We encountered the same problem as
https://groups.google.com/d/topic/lynckia/eDJWQujT2dY/discussion

https://groups.google.com/d/topic/lynckia/HD5SFNrcoIQ/discussion

The solution was actually described there, but we never found the patch.

The short version of this issue:

Firefox publishers show up as black screens.

Changing WebRtcConnection.cpp as here will fix this.

The long version:

WebRtcConnection read the video SSRC from RTP packets when the source was a
firefox publisher. It also cast RTCP packets as RTP packets for this. The
result is that the bytes 12 to 15 of a RTCP Sender Report were interpreted
as SSRC despite those being part of a timestamp. When the first packet was
RTP, the algorithm actually had the right video SSRC, but when the first
packet was RTCP the wrong video SSRC was retrieved.

This resulted in Firefox publish streams not properly reacting to RTCP
feedback because a wrong video SSRC was used. The actual cause for the
black screen was that Firefox rejected the Picture Loss Indicator (PLI)
because it was sent for a wrong video SSRC.

The fix addresses the issue by checking the packet type for RTCP and
reading the video SSRC from the correct position. It also prevents
overwriting the timestamp in RTCP packets and only sets the video SSRC if
the packet is RTP.

The fix might solve a lot more issues with Firefox since it now uses the
correct video SSRC. Chrome publishers were never affected since they
provide the video SSRC in the SDP.

Best regards,

-Daniel