From 24ce188f1a8659c9d680a491f0438e09d8393bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Tue, 8 Oct 2024 10:09:12 +0200 Subject: [PATCH 1/2] Fix rtcp for no track --- lib/ex_webrtc/peer_connection.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ex_webrtc/peer_connection.ex b/lib/ex_webrtc/peer_connection.ex index 4f2dcda..82f9177 100644 --- a/lib/ex_webrtc/peer_connection.ex +++ b/lib/ex_webrtc/peer_connection.ex @@ -2087,6 +2087,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) From d030474d656dd8822ddf706c216f32c0bb3ea93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Wed, 9 Oct 2024 13:14:39 +0200 Subject: [PATCH 2/2] Handle other case --- lib/ex_webrtc/peer_connection.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ex_webrtc/peer_connection.ex b/lib/ex_webrtc/peer_connection.ex index 82f9177..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} ->