]> git.sesse.net Git - vlc/blobdiff - modules/meta_engine/taglib.cpp
demux: provide both URL and file path as with access
[vlc] / modules / meta_engine / taglib.cpp
index 4ededfdab235a1fa28a574a5c3342178e53044a7..973e42ef0a19d8b3011f84bbd2712c6c5a89500e 100644 (file)
@@ -356,14 +356,14 @@ static int ReadMeta( vlc_object_t* p_this)
     demux_t*        p_demux = p_demux_meta->p_demux;
     vlc_meta_t*     p_meta;
     FileRef f;
-    char *psz_path = decode_URI_duplicate( p_demux->psz_path );
 
     p_demux_meta->p_meta = NULL;
-    if( !psz_path )
-        return VLC_ENOMEM;
-    if( strncmp( p_demux->psz_access, "file", strlen("file") ) )
+    if( strcmp( p_demux->psz_access, "file" ) )
         return VLC_EGENERIC;
 
+    char *psz_path = decode_URI_duplicate( p_demux->psz_file );
+    if( !psz_path )
+        return VLC_ENOMEM;
 
 #if defined(WIN32) || defined (UNDER_CE)
     wchar_t wpath[MAX_PATH + 1];