wasapi: Don't pass CoTaskMemFree to g_clear_pointer
CoTaskMemFree has a different calling convention than GDestroyNotify
and things crash at least with MinGW.
https://bugzilla.gnome.org/show_bug.cgi?id=796280
diff --git a/sys/wasapi/gstwasapisink.c b/sys/wasapi/gstwasapisink.c
index e06f07a..fc5a32f 100644
--- a/sys/wasapi/gstwasapisink.c
+++ b/sys/wasapi/gstwasapisink.c
@@ -208,7 +208,8 @@
{
GstWasapiSink *self = GST_WASAPI_SINK (object);
- g_clear_pointer (&self->mix_format, CoTaskMemFree);
+ CoTaskMemFree (self->mix_format);
+ self->mix_format = NULL;
if (self->cached_caps != NULL) {
gst_caps_unref (self->cached_caps);
diff --git a/sys/wasapi/gstwasapisrc.c b/sys/wasapi/gstwasapisrc.c
index 1dbbc82..bf52062 100644
--- a/sys/wasapi/gstwasapisrc.c
+++ b/sys/wasapi/gstwasapisrc.c
@@ -218,7 +218,8 @@
{
GstWasapiSrc *self = GST_WASAPI_SRC (object);
- g_clear_pointer (&self->mix_format, CoTaskMemFree);
+ CoTaskMemFree (self->mix_format);
+ self->mix_format = NULL;
g_clear_pointer (&self->cached_caps, gst_caps_unref);
g_clear_pointer (&self->positions, g_free);