mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
webrtcstats: Properly report IceCandidate type
strcmp returns a positive value if s1 is greater than s2, while we actually needed to check equality here. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4952>
This commit is contained in:
parent
565f9d18ae
commit
d317379287
1 changed files with 2 additions and 2 deletions
|
@ -584,9 +584,9 @@ _get_stats_from_ice_candidates (GstWebRTCBin * webrtc,
|
|||
can->stream_id, can->ipaddr, can->port);
|
||||
stats = gst_structure_new_empty (id);
|
||||
|
||||
if (strcmp (candidate_tag, "local")) {
|
||||
if (g_str_equal (candidate_tag, "local")) {
|
||||
type = GST_WEBRTC_STATS_LOCAL_CANDIDATE;
|
||||
} else if (strcmp (candidate_tag, "remote")) {
|
||||
} else if (g_str_equal (candidate_tag, "remote")) {
|
||||
type = GST_WEBRTC_STATS_REMOTE_CANDIDATE;
|
||||
} else {
|
||||
GST_WARNING_OBJECT (webrtc, "Invalid ice candidate tag: %s", candidate_tag);
|
||||
|
|
Loading…
Reference in a new issue