From: Philippe Normand Date: Fri, 30 Jun 2023 17:30:46 +0000 (+0100) Subject: webrtcstats: Properly report IceCandidate type X-Git-Tag: 1.22.7~172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a75140ba871aae590dc37c08a8e5357ef5e746ea;p=platform%2Fupstream%2Fgstreamer.git 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: --- diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c index db922f0..153ade6 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c @@ -581,9 +581,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);