You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I simulated packet loss by generating UDP packet drops, triggering RTCP (NACK) requests in Pion WebRTC with RTX enabled.
Expected Behavior
The RTCP (NACK) requests should stop once the missing packet is successfully received via RTX, preventing further redundant requests.
Actual Behavior
Pion continuously sends RTCP (NACK) requests for the same packet, even after the RTX packet is received and processed.
This happens because RTX packets are only logged in the receiver log of the RTX track, not the corresponding RTP track.
The tight coupling of the RTPReader within the interceptor prevents RTX packets from passing through the correct interceptor chain for the RTP track.
Root Cause
The ReadRTP function reads an RTP packet and passes it through the interceptor chain.
However, when an RTX packet is received, it isn’t processed through the corresponding RTP track’s interceptor chain.
As a result, it isn’t logged in the RTP track’s receiver log, causing the system to treat the packet as missing and repeatedly issue NACKs.
Proposed Fix
To resolve this, I propose separating the reading and processing of RTP packets:
Read RTP: Handle packet reading independently to avoid tight coupling with the interceptor.
Process RTP: Pass the packet (including converted RTX packets) through the interceptor chain explicitly.
Currently, RTX packets are converted to RTP packets but not passed through the interceptor chain. By splitting the process, the converted RTX packets can be processed through the appropriate interceptors and logged correctly in the RTP track’s receiver log.