Commit 5395e9b8 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

subtitles: Fix subtitles detection.

parent a7d96e44
......@@ -271,14 +271,15 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
return NULL;
}
char *f_fname = strrchr( f_dir, DIR_SEP_CHAR );
const char *f_fname = strrchr( psz_fname, DIR_SEP_CHAR );
if( !f_fname )
{
free( f_dir );
free( psz_fname );
return NULL;
}
*(++f_fname) = 0; /* keep dir separator in f_dir */
f_fname++; /* Skip the '/' */
f_dir[f_fname - psz_fname] = 0; /* keep dir separator in f_dir */
i_fname_len = strlen( f_fname );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment