Commit b7f6772e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

subtitles: Fix subtitles detection.

(cherry picked from commit 5395e9b85e5823b41cf7353b327445c6ff426edf)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 106bf7aa
...@@ -273,14 +273,15 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -273,14 +273,15 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
return NULL; return NULL;
} }
char *f_fname = strrchr( f_dir, DIR_SEP_CHAR ); const char *f_fname = strrchr( psz_fname, DIR_SEP_CHAR );
if( !f_fname ) if( !f_fname )
{ {
free( f_dir ); free( f_dir );
free( psz_fname ); free( psz_fname );
return NULL; 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 ); 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