Fixes random crashes when an allocated webrtcbin isn't
given fresh 0-filled memory in its allocation. It works
mostly because GMutex and GCond are automatically initialised
in that case.
gst_structure_free (webrtc->priv->stats);
webrtc->priv->stats = NULL;
+ g_mutex_clear (PC_GET_LOCK (webrtc));
+ g_cond_clear (PC_GET_COND (webrtc));
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
gst_webrtc_bin_init (GstWebRTCBin * webrtc)
{
webrtc->priv = gst_webrtc_bin_get_instance_private (webrtc);
+ g_mutex_init (PC_GET_LOCK (webrtc));
+ g_cond_init (PC_GET_COND (webrtc));
_start_thread (webrtc);