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
This commit is contained in:
Vadim Zeitlin
2012-07-02 00:16:14 +00:00
parent fcbf733155
commit 7ae14eb15f

View File

@@ -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));
}
//-----------------------------------------------------------------------------