[DVDnav-discuss] r1195 - trunk/libdvdread/src/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Tue Jun 1 09:27:56 CEST 2010


Author: nicodvb
Date: Tue Jun  1 09:27:56 2010
New Revision: 1195

Log:
in _WIN32 do a sanity check against \video_ts in addition to /video_ts, because both paths are admitted; patch by John Stebbins from Handbrake

Modified:
   trunk/libdvdread/src/dvd_reader.c

Modified: trunk/libdvdread/src/dvd_reader.c
==============================================================================
--- trunk/libdvdread/src/dvd_reader.c	Fri May 28 15:24:16 2010	(r1194)
+++ trunk/libdvdread/src/dvd_reader.c	Tue Jun  1 09:27:56 2010	(r1195)
@@ -453,6 +453,13 @@ dvd_reader_t *DVDOpen( const char *ppath
       }
     }
 
+#ifdef _WIN32
+    if(strlen(path_copy) > TITLES_MAX) {
+      if(!strcasecmp(&(path_copy[strlen( path_copy ) - TITLES_MAX]),
+                       "\\video_ts"))
+        path_copy[strlen(path_copy) - (TITLES_MAX-1)] = '\0';
+    }
+#endif
     if( strlen( path_copy ) > TITLES_MAX ) {
       if( !strcasecmp( &(path_copy[ strlen( path_copy ) - TITLES_MAX ]),
                        "/video_ts" ) ) {


More information about the DVDnav-discuss mailing list