Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1998>
return FALSE;
}
+void
+gst_webrtc_ice_candidate_stats_free (GstWebRTCICECandidateStats * stats)
+{
+ if (stats) {
+ g_free (stats->ipaddr);
+ g_free (stats->url);
+ }
+
+ g_free (stats);
+}
+
static void
_clear_ice_stream (struct NiceStreamItem *item)
{
GstWebRTCICEStream * stream,
GstWebRTCICECandidateStats ** local_stats,
GstWebRTCICECandidateStats ** remote_stats);
+
+void gst_webrtc_ice_candidate_stats_free (GstWebRTCICECandidateStats * stats);
+
G_END_DECLS
#endif /* __GST_WEBRTC_ICE_H__ */
g_free (local_cand_id);
g_free (remote_cand_id);
- if (local_cand) {
- g_free (local_cand->ipaddr);
- g_free (local_cand->url);
- }
- if (remote_cand)
- g_free (remote_cand->ipaddr);
-
- g_free (local_cand);
- g_free (remote_cand);
+ gst_webrtc_ice_candidate_stats_free (local_cand);
+ gst_webrtc_ice_candidate_stats_free (remote_cand);
gst_structure_free (stats);