[vlc-devel] commit: Ticket 3234 autodetect subtitles (Kamil Baldyga )

git version control git at videolan.org
Sun Jan 31 16:50:40 CET 2010


vlc | branch: master | Kamil Baldyga <kbaldyga at gmail.com> | Sat Jan 30 21:01:08 2010 +0100| [07e20e1bc586913a1c887f55ab1f5ec357f9fbef] | committer: Rémi Denis-Courmont 

Ticket 3234 autodetect subtitles

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07e20e1bc586913a1c887f55ab1f5ec357f9fbef
---

 src/input/subtitles.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/input/subtitles.c b/src/input/subtitles.c
index 01aeda5..2b8f31a 100644
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -265,9 +265,18 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
     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 );
     if( !psz_fname )
         return NULL;




More information about the vlc-devel mailing list