Skip to content

Commit

Permalink
Parse only pure integers in next_mid function
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Oct 27, 2023
1 parent cb5c805 commit a07928e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ex_webrtc/peer_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 463 in lib/ex_webrtc/peer_connection.ex

View check run for this annotation

Codecov / codecov/patch

lib/ex_webrtc/peer_connection.ex#L461-L463

Added lines #L461 - L463 were not covered by tests
mid
end
end

tsc_mids =
for %RTPTransceiver{mid: mid} when mid != nil <- state.transceivers,
{mid, _} <- Integer.parse(mid) do
{mid, ""} <- Integer.parse(mid) do

Check warning on line 470 in lib/ex_webrtc/peer_connection.ex

View check run for this annotation

Codecov / codecov/patch

lib/ex_webrtc/peer_connection.ex#L468-L470

Added lines #L468 - L470 were not covered by tests
mid
end

Expand Down

0 comments on commit a07928e

Please sign in to comment.