]> git.sesse.net Git - vlc/commitdiff
skins2: correct a uri conversion issue with new vlc_path2uri
authorErwan Tulou <erwan10@videolan.org>
Tue, 13 Nov 2012 12:41:12 +0000 (13:41 +0100)
committerErwan Tulou <erwan10@videolan.org>
Tue, 13 Nov 2012 13:36:19 +0000 (14:36 +0100)
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.

modules/gui/skins2/src/file_bitmap.cpp

index 51dee1741c713f20f62a499bd2f8c2d8095591c2..daab9225959240821b4f0289a2a344eb181b6fad 100644 (file)
@@ -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;