]> git.sesse.net Git - vlc/commitdiff
mkv: use DIR_SEP_CHAR when applicable.
authorRémi Duraffort <ivoire@videolan.org>
Tue, 26 May 2009 15:20:55 +0000 (17:20 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 26 May 2009 15:21:50 +0000 (17:21 +0200)
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.hpp

index f6b9f69b2b23ebfbbc30af941390392f804ae190..c56fe0bcbd8bc14aadab0c28ca43f40cec020898 100644 (file)
@@ -145,15 +145,15 @@ static int Open( vlc_object_t * p_this )
             // assume it's a regular file
             // get the directory path
             s_path = p_demux->psz_path;
-            if (s_path.at(s_path.length() - 1) == DIRECTORY_SEPARATOR)
+            if (s_path.at(s_path.length() - 1) == DIR_SEP_CHAR)
             {
                 s_path = s_path.substr(0,s_path.length()-1);
             }
             else
             {
-                if (s_path.find_last_of(DIRECTORY_SEPARATOR) > 0)
+                if (s_path.find_last_of(DIR_SEP_CHAR) > 0)
                 {
-                    s_path = s_path.substr(0,s_path.find_last_of(DIRECTORY_SEPARATOR));
+                    s_path = s_path.substr(0,s_path.find_last_of(DIR_SEP_CHAR));
                 }
             }
 
@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this )
                 {
                     if (strlen(psz_file) > 4)
                     {
-                        s_filename = s_path + DIRECTORY_SEPARATOR + psz_file;
+                        s_filename = s_path + DIR_SEP_CHAR + psz_file;
 
 #ifdef WIN32
                         if (!strcasecmp(s_filename.c_str(), p_demux->psz_path))
index c01e5fff96066343d37a609bbd70b347a860905f..49119ad6c94de13c51f6521248937889cfea1e35 100644 (file)
@@ -119,16 +119,6 @@ extern "C" {
 
 #define MKVD_TIMECODESCALE 1000000
 
-/**
- * What's between a directory and a filename?
- */
-#if defined( WIN32 )
-    #define DIRECTORY_SEPARATOR '\\'
-#else
-    #define DIRECTORY_SEPARATOR '/'
-#endif
-
-
 #define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )