summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-09-13 16:37:41 +0200
committerGitHub <noreply@github.com>2020-09-13 16:37:41 +0200
commita7b979084f51f1de5dac8d346886f3a7d6aa75af (patch)
treea9a8ffa6cadbb9133e162ceea52b9ef792ee2183 /src
parentMerge pull request #279 from Lurkki14/master (diff)
parentIgnore empty remote ICE candidates (diff)
downloadnheko-a7b979084f51f1de5dac8d346886f3a7d6aa75af.tar.xz
Merge pull request #280 from trilene/voip
Ignore empty remote ICE candidates
Diffstat (limited to 'src')
-rw-r--r--src/WebRTCSession.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp
index 1c1d008d..e9822f7d 100644
--- a/src/WebRTCSession.cpp
+++ b/src/WebRTCSession.cpp
@@ -426,8 +426,12 @@ WebRTCSession::acceptICECandidates(
                 for (const auto &c : candidates) {
                         nhlog::ui()->debug(
                           "WebRTC: remote candidate: (m-line:{}):{}", c.sdpMLineIndex, c.candidate);
-                        g_signal_emit_by_name(
-                          webrtc_, "add-ice-candidate", c.sdpMLineIndex, c.candidate.c_str());
+                        if (!c.candidate.empty()) {
+                                g_signal_emit_by_name(webrtc_,
+                                                      "add-ice-candidate",
+                                                      c.sdpMLineIndex,
+                                                      c.candidate.c_str());
+                        }
                 }
         }
 }