From 6f7c9e43bc13102ff7fc73bd359c750a227f6588 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 10 May 2019 07:32:21 +0530 Subject: [PATCH] audio: Use LoadPackagedLibrary when building for UWP Universal Windows Platform apps are not allowed to use LoadLibrary to load arbitrary DLLs from the filesystem. They can only use LoadPackagedLibrary to load DLLs that have been packaged with the app as assets. See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/190 --- gst-libs/gst/audio/gstaudioutilsprivate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioutilsprivate.c b/gst-libs/gst/audio/gstaudioutilsprivate.c index 5034975dce..629e885ab0 100644 --- a/gst-libs/gst/audio/gstaudioutilsprivate.c +++ b/gst-libs/gst/audio/gstaudioutilsprivate.c @@ -238,7 +238,11 @@ __gst_audio_init_thread_priority (void) return _gst_audio_avrt_tbl.dll != NULL; if (!_gst_audio_avrt_tbl.dll) +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + _gst_audio_avrt_tbl.dll = LoadPackagedLibrary (TEXT ("avrt.dll"), 0); +#else _gst_audio_avrt_tbl.dll = LoadLibrary (TEXT ("avrt.dll")); +#endif if (!_gst_audio_avrt_tbl.dll) { GST_WARNING ("Failed to set thread priority, can't find avrt.dll");