[libdvdnav-devel] Use correct constant
Petri Hintukainen
git at videolan.org
Wed May 20 21:12:05 CEST 2015
libdvdread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Wed May 20 13:41:38 2015 +0300| [75c0cae2f32be6d7b076818571341dde83c1771b] | committer: Jean-Baptiste Kempf
Use correct constant
TITLES_MAX was used as length of string "/video_ts".
There's no relation between these two constants.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=75c0cae2f32be6d7b076818571341dde83c1771b
---
src/dvd_reader.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index 005d90b..f9c05b4 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -484,16 +484,16 @@ static dvd_reader_t *DVDOpenCommon( const char *ppath,
}
#if defined(_WIN32) || defined(__OS2__)
- if(strlen(path_copy) > TITLES_MAX) {
- if(!strcasecmp(&(path_copy[strlen( path_copy ) - TITLES_MAX]),
+ if( strlen( path_copy ) > 9 ) {
+ if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),
"\\video_ts"))
- path_copy[strlen(path_copy) - (TITLES_MAX-1)] = '\0';
+ path_copy[ strlen( path_copy ) - (9-1) ] = '\0';
}
#endif
- if( strlen( path_copy ) > TITLES_MAX ) {
- if( !strcasecmp( &(path_copy[ strlen( path_copy ) - TITLES_MAX ]),
+ if( strlen( path_copy ) > 9 ) {
+ if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),
"/video_ts" ) ) {
- path_copy[ strlen( path_copy ) - TITLES_MAX ] = '\0';
+ path_copy[ strlen( path_copy ) - 9 ] = '\0';
}
}
More information about the libdvdnav-devel
mailing list