summary refs log tree commit diff
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-09-13 10:21:29 -0400
committertrilene <trilene@runbox.com>2020-09-13 10:21:29 -0400
commit124952a11cdcb5953bca272fd340660ac664909c (patch)
tree8b5fbc99a5a4adfac38d280a4a20f35d2dfb9536
parentGStreamer v1.18.0 released (diff)
downloadnheko-124952a11cdcb5953bca272fd340660ac664909c.tar.xz
Ignore empty remote ICE candidates
-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());
+                        }
                 }
         }
 }