From 73f8de33054870903f9e08087383516114dd4660 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 4 Feb 2025 02:52:51 +0900 Subject: [PATCH] mfdevice: Fix memory leak Release resources on dispose() as intended Part-of: --- .../gst-plugins-bad/sys/mediafoundation/gstmfdevice.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfdevice.cpp b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfdevice.cpp index b9f1fe65c0..90cd4046d5 100644 --- a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfdevice.cpp +++ b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfdevice.cpp @@ -197,14 +197,15 @@ gst_mf_device_provider_device_enum_completed (GstWinRTDeviceWatcher * watcher, gpointer user_data); #endif -static void -gst_mf_device_provider_on_device_updated (GstMFDeviceProvider * self); - static void gst_mf_device_provider_class_init (GstMFDeviceProviderClass * klass) { + auto object_class = G_OBJECT_CLASS (klass); GstDeviceProviderClass *provider_class = GST_DEVICE_PROVIDER_CLASS (klass); + object_class->dispose = gst_mf_device_provider_dispose; + object_class->finalize = gst_mf_device_provider_finalize; + provider_class->probe = GST_DEBUG_FUNCPTR (gst_mf_device_provider_probe); provider_class->start = GST_DEBUG_FUNCPTR (gst_mf_device_provider_start); provider_class->stop = GST_DEBUG_FUNCPTR (gst_mf_device_provider_stop);