diff --git a/lib/ex_webrtc/peer_connection.ex b/lib/ex_webrtc/peer_connection.ex index 4f2dcda..065d766 100644 --- a/lib/ex_webrtc/peer_connection.ex +++ b/lib/ex_webrtc/peer_connection.ex @@ -2063,6 +2063,9 @@ defmodule ExWebRTC.PeerConnection do nil -> {nil, state} + {%{sender: %{track: nil}}, _idx} -> + {nil, state} + # in case NACK was received, but RTX was not negotiated # as NACK and RTX are negotiated independently {%{sender: %{rtx_pt: nil}} = tr, _idx} -> @@ -2087,6 +2090,9 @@ defmodule ExWebRTC.PeerConnection do nil -> {nil, state} + {%{sender: %{track: nil}}, _idx} -> + {nil, state} + {tr, idx} -> tr = RTPTransceiver.receive_pli(tr, pli) transceivers = List.replace_at(state.transceivers, idx, tr)