[vlc-commits] skins2: correct a uri conversion issue with new vlc_path2uri
Erwan Tulou
git at videolan.org
Tue Nov 13 14:37:46 CET 2012
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Tue Nov 13 13:41:12 2012 +0100| [ada0afffaef8efc179b7127d88a18c2aa7cb2fb6] | committer: Erwan Tulou
skins2: correct a uri conversion issue with new vlc_path2uri
new vlc_path2uri function now expects a valid not-yet-converted file name.
This fixes art display errors with latest vlc from current git rep.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ada0afffaef8efc179b7127d88a18c2aa7cb2fb6
---
modules/gui/skins2/src/file_bitmap.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/gui/skins2/src/file_bitmap.cpp b/modules/gui/skins2/src/file_bitmap.cpp
index 51dee17..daab922 100644
--- a/modules/gui/skins2/src/file_bitmap.cpp
+++ b/modules/gui/skins2/src/file_bitmap.cpp
@@ -43,10 +43,16 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
video_format_Init( &fmt_in, 0 );
video_format_Init( &fmt_out, VLC_CODEC_RGBA );
- char* psz_uri = vlc_path2uri( fileName.c_str(), NULL );
- pPic = image_ReadUrl( pImageHandler, psz_uri, &fmt_in, &fmt_out );
- free( psz_uri );
+ if( strstr( fileName.c_str(), "://" ) == NULL )
+ {
+ char *psz_uri = vlc_path2uri( fileName.c_str(), NULL );
+ if( !psz_uri )
+ return;
+ fileName = psz_uri;
+ free( psz_uri );
+ }
+ pPic = image_ReadUrl( pImageHandler, fileName.c_str(), &fmt_in, &fmt_out );
if( !pPic )
return;
More information about the vlc-commits
mailing list