Commit 58f63289 authored by Erwan Tulou's avatar Erwan Tulou

skins2: ensure uri-encoded paths are passed to vlc core

parent e0ff545e
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "xmlparser.hpp" #include "xmlparser.hpp"
#include "../src/os_factory.hpp" #include "../src/os_factory.hpp"
#include <vlc_url.h>
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
# include <sys/stat.h> # include <sys/stat.h>
...@@ -54,7 +55,10 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName, ...@@ -54,7 +55,10 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
// } // }
LoadCatalog(); LoadCatalog();
m_pStream = stream_UrlNew( pIntf, rFileName.c_str() ); char* psz_uri = make_URI( rFileName.c_str() );
m_pStream = stream_UrlNew( pIntf, psz_uri );
free( psz_uri );
if( !m_pStream ) if( !m_pStream )
{ {
msg_Err( getIntf(), "failed to open %s for reading", msg_Err( getIntf(), "failed to open %s for reading",
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_image.h> #include <vlc_image.h>
#include <vlc_url.h>
#include "file_bitmap.hpp" #include "file_bitmap.hpp"
FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler, FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
...@@ -41,8 +42,12 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler, ...@@ -41,8 +42,12 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
fmt_out.i_chroma = VLC_CODEC_RGBA; fmt_out.i_chroma = VLC_CODEC_RGBA;
pPic = image_ReadUrl( pImageHandler, fileName.c_str(), &fmt_in, &fmt_out ); char* psz_uri = make_URI( fileName.c_str() );
if( !pPic ) return; pPic = image_ReadUrl( pImageHandler, psz_uri, &fmt_in, &fmt_out );
free( psz_uri );
if( !pPic )
return;
m_width = fmt_out.i_width; m_width = fmt_out.i_width;
m_height = fmt_out.i_height; m_height = fmt_out.i_height;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment