alsa: free conf cache under valgrind

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9352>
This commit is contained in:
Doug Nazar 2025-06-11 01:45:43 -04:00 committed by GStreamer Marge Bot
parent 7ad82930e2
commit d694a38cc3
2 changed files with 20 additions and 0 deletions

View File

@ -55,6 +55,10 @@
#include <gst/audio/gstdsd.h>
#include <glib/gi18n-lib.h>
#ifdef HAVE_VALGRIND
# include <valgrind/valgrind.h>
#endif
#ifndef ESTRPIPE
#define ESTRPIPE EPIPE
#endif
@ -140,6 +144,12 @@ gst_alsasink_finalise (GObject * object)
}
g_mutex_unlock (&output_mutex);
#ifdef HAVE_VALGRIND
if (RUNNING_ON_VALGRIND) {
snd_config_update_free_global ();
}
#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}

View File

@ -50,6 +50,10 @@
#include <glib/gi18n-lib.h>
#ifdef HAVE_VALGRIND
# include <valgrind/valgrind.h>
#endif
#ifndef ESTRPIPE
#define ESTRPIPE EPIPE
#endif
@ -123,6 +127,12 @@ gst_alsasrc_finalize (GObject * object)
g_free (src->device);
g_mutex_clear (&src->alsa_lock);
#ifdef HAVE_VALGRIND
if (RUNNING_ON_VALGRIND) {
snd_config_update_free_global ();
}
#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}