From bcbd425ef502ce07c6723ad9e8ab0802c91100b7 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 09:59:32 -0400 Subject: [PATCH] Load GStreamer plugins in UWP builds. --- components/servo/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/servo/lib.rs b/components/servo/lib.rs index a64972bc1a7..1ffd3e6818d 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -134,8 +134,15 @@ mod media_platform { #[cfg(windows)] pub fn init() { - let mut plugin_dir = std::env::current_exe().unwrap(); - plugin_dir.pop(); + // UWP apps have the working directory set appropriately. Win32 apps + // do not and need some assistance finding the DLLs. + let plugin_dir = if cfg!(feature = "uwp") { + std::path::PathBuf::new() + } else { + let mut plugin_dir = std::env::current_exe().unwrap(); + plugin_dir.pop(); + plugin_dir + }; let uwp_plugins = [ "gstapp.dll",