Skip to content

Commit 261122a

Browse files
authored
Fix handling RTCP when there is no track (#170)
1 parent 4782ace commit 261122a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/ex_webrtc/peer_connection.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,9 @@ defmodule ExWebRTC.PeerConnection do
20632063
nil ->
20642064
{nil, state}
20652065

2066+
{%{sender: %{track: nil}}, _idx} ->
2067+
{nil, state}
2068+
20662069
# in case NACK was received, but RTX was not negotiated
20672070
# as NACK and RTX are negotiated independently
20682071
{%{sender: %{rtx_pt: nil}} = tr, _idx} ->
@@ -2087,6 +2090,9 @@ defmodule ExWebRTC.PeerConnection do
20872090
nil ->
20882091
{nil, state}
20892092

2093+
{%{sender: %{track: nil}}, _idx} ->
2094+
{nil, state}
2095+
20902096
{tr, idx} ->
20912097
tr = RTPTransceiver.receive_pli(tr, pli)
20922098
transceivers = List.replace_at(state.transceivers, idx, tr)

0 commit comments

Comments
 (0)