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:
@@ -34,6 +34,7 @@
|
|||||||
#include "wx/timer.h" // wxTimer
|
#include "wx/timer.h" // wxTimer
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/filesys.h" // FileNameToURL()
|
||||||
#include "wx/thread.h" // wxMutex/wxMutexLocker
|
#include "wx/thread.h" // wxMutex/wxMutexLocker
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#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));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user