From 7ae14eb15fc20e2bd6a166121647215d17e0f8af Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Jul 2012 00:16:14 +0000 Subject: [PATCH] Use wxFileSystem::FileNameToURL() in wxGStreamerMediaBackend. Converting files to URIs is not as simple as just prepending "file://" to them, notably we need to escape characters that are special in URIs such as "#" and "%", so use FileNameToURL() which already does do it correctly. Closes #13663. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/mediactrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 01a3ed607f..8283d5114a 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -34,6 +34,7 @@ #include "wx/timer.h" // wxTimer #endif +#include "wx/filesys.h" // FileNameToURL() #include "wx/thread.h" // wxMutex/wxMutexLocker #ifdef __WXGTK__ @@ -1168,7 +1169,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, //----------------------------------------------------------------------------- bool wxGStreamerMediaBackend::Load(const wxString& fileName) { - return DoLoad(wxString( wxT("file://") ) + fileName); + return DoLoad(wxFileSystem::FileNameToURL(fileName)); } //----------------------------------------------------------------------------- -- 2.45.2