From a07928e649714a3daca9b6e9235528094d3a0754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wala?= Date: Fri, 27 Oct 2023 09:55:22 +0200 Subject: [PATCH] Parse only pure integers in `next_mid` function --- lib/ex_webrtc/peer_connection.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ex_webrtc/peer_connection.ex b/lib/ex_webrtc/peer_connection.ex index 808c85cd..95dc13c5 100644 --- a/lib/ex_webrtc/peer_connection.ex +++ b/lib/ex_webrtc/peer_connection.ex @@ -460,14 +460,14 @@ defmodule ExWebRTC.PeerConnection do else for mline <- state.current_remote_desc.media, {:mid, mid} <- ExSDP.Media.get_attribute(mline, :mid), - {mid, _} <- Integer.parse(mid) do + {mid, ""} <- Integer.parse(mid) do mid end end tsc_mids = for %RTPTransceiver{mid: mid} when mid != nil <- state.transceivers, - {mid, _} <- Integer.parse(mid) do + {mid, ""} <- Integer.parse(mid) do mid end