[vlc-commits] subtitles: Fix subtitles detection.
Hugo Beauzée-Luyssen
git at videolan.org
Tue Apr 10 16:04:36 CEST 2012
vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 10 15:26:39 2012 +0200| [5395e9b85e5823b41cf7353b327445c6ff426edf] | committer: Hugo Beauzée-Luyssen
subtitles: Fix subtitles detection.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5395e9b85e5823b41cf7353b327445c6ff426edf
---
src/input/subtitles.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index 5275eee..ed0382c 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -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 );
More information about the vlc-commits
mailing list