]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxFileSystem::FileNameToURL() in wxGStreamerMediaBackend.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2012 00:16:14 +0000 (00:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2012 00:16:14 +0000 (00:16 +0000)
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

index 01a3ed607f86d93d3eb5d801240d271a06c68391..8283d5114a936f4a39f3e99e0e84fa2334ba12e6 100644 (file)
@@ -34,6 +34,7 @@
     #include "wx/timer.h"           // wxTimer
 #endif
 
     #include "wx/timer.h"           // wxTimer
 #endif
 
+#include "wx/filesys.h"             // FileNameToURL()
 #include "wx/thread.h"              // wxMutex/wxMutexLocker
 
 #ifdef __WXGTK__
 #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)
 {
 //-----------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Load(const wxString& fileName)
 {
-    return DoLoad(wxString( wxT("file://") ) + fileName);
+    return DoLoad(wxFileSystem::FileNameToURL(fileName));
 }
 
 //-----------------------------------------------------------------------------
 }
 
 //-----------------------------------------------------------------------------