if( !psz_name_org )
return NULL;
- if( !strncmp( psz_name_org, "file://", 7 ) )
- {
- psz_name_org += 7;
-#if defined( WIN32 )
- psz_name_org ++ ;
-#endif
- if( !strncmp( psz_name_org, "localhost", 9 ) )
- psz_name_org += 9;
- }
-
-#if (DIR_SEP_CHAR != '/')
- /* Turn slashes into anti-slashes */
- for( char *s = strchr( psz_name_org, '/' ); s; s = strchr( s + 1, '/' ) )
- *s = DIR_SEP_CHAR;
-#endif
- char *psz_fname = decode_URI_duplicate( psz_name_org );
+ char *psz_fname = make_path( psz_name_org );
if( !psz_fname )
return NULL;
continue;
/* parse psz_src dir */
- i_dir_content = utf8_scandir( psz_dir, &ppsz_dir_content,
+ i_dir_content = vlc_scandir( psz_dir, &ppsz_dir_content,
subtitles_Filter, NULL );
if( i_dir_content < 0 )
continue;
if( !strcmp( psz_path, psz_fname ) )
continue;
- if( !utf8_stat( psz_path, &st ) && S_ISREG( st.st_mode ) && result )
+ if( !vlc_stat( psz_path, &st ) && S_ISREG( st.st_mode ) && result )
{
msg_Dbg( p_this,
"autodetected subtitle: %s with priority %d",