summaryrefslogtreecommitdiff
path: root/sys/wasapi
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-05-22 22:12:34 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2018-05-23 13:24:00 +0530
commitadb1df3bc102657b60a8400a9804b8836494a752 (patch)
treefc5e97497a30baa0be3c0f4a77ccda0539bd41ed /sys/wasapi
parent2227ef13046d8da719121b1391ded60290d70bd4 (diff)
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
Diffstat (limited to 'sys/wasapi')
-rw-r--r--sys/wasapi/gstwasapisink.c3
-rw-r--r--sys/wasapi/gstwasapisrc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/wasapi/gstwasapisink.c b/sys/wasapi/gstwasapisink.c
index 3fa370dc4..c636bca67 100644
--- a/sys/wasapi/gstwasapisink.c
+++ b/sys/wasapi/gstwasapisink.c
@@ -208,7 +208,8 @@ gst_wasapi_sink_finalize (GObject * object)
{
GstWasapiSink *self = GST_WASAPI_SINK (object);
- g_clear_pointer (&self->mix_format, CoTaskMemFree);
+ CoTaskMemFree (self->mix_format);
+ self->mix_format = NULL;
CoUninitialize ();
diff --git a/sys/wasapi/gstwasapisrc.c b/sys/wasapi/gstwasapisrc.c
index b5a97a2e2..420ddbda5 100644
--- a/sys/wasapi/gstwasapisrc.c
+++ b/sys/wasapi/gstwasapisrc.c
@@ -227,7 +227,8 @@ gst_wasapi_src_finalize (GObject * object)
{
GstWasapiSrc *self = GST_WASAPI_SRC (object);
- g_clear_pointer (&self->mix_format, CoTaskMemFree);
+ CoTaskMemFree (self->mix_format);
+ self->mix_format = NULL;
CoUninitialize ();