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
This commit is contained in:
Christoph Reiter 2018-05-22 22:12:34 +02:00 committed by Nirbheek Chauhan
parent fd178617d0
commit aa77cac8ec
2 changed files with 4 additions and 2 deletions

View file

@ -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;
if (self->cached_caps != NULL) {
gst_caps_unref (self->cached_caps);

View file

@ -218,7 +218,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;
g_clear_pointer (&self->cached_caps, gst_caps_unref);
g_clear_pointer (&self->positions, g_free);