]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/file_bitmap.cpp
make_URI: add scheme parameter
[vlc] / modules / gui / skins2 / src / file_bitmap.cpp
index 925ad2a6e0a357002488e293baf6af283cab0925..051de8a693dba47122afd34b72bf94f992433cda 100644 (file)
 
 #include <vlc_common.h>
 #include <vlc_image.h>
+#include <vlc_url.h>
 #include "file_bitmap.hpp"
 
 FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
                         string fileName, uint32_t aColor, int nbFrames,
-                        int fps ):
-    GenericBitmap( pIntf, nbFrames, fps ), m_width( 0 ), m_height( 0 ),
+                        int fps, int nbLoops ):
+    GenericBitmap( pIntf, nbFrames, fps, nbLoops ), m_width( 0 ), m_height( 0 ),
     m_pData( NULL )
 {
     video_format_t fmt_in = {0}, fmt_out = {0};
@@ -41,8 +42,12 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
 
     fmt_out.i_chroma = VLC_CODEC_RGBA;
 
-    pPic = image_ReadUrl( pImageHandler, fileName.c_str(), &fmt_in, &fmt_out );
-    if( !pPic ) return;
+    char* psz_uri = make_URI( fileName.c_str(), NULL );
+    pPic = image_ReadUrl( pImageHandler, psz_uri, &fmt_in, &fmt_out );
+    free( psz_uri );
+
+    if( !pPic )
+        return;
 
     m_width = fmt_out.i_width;
     m_height = fmt_out.i_height;