From bff9e8e385f9ed3ef008ba0a1ef11ccc26e1898b Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Sat, 15 May 2004 12:22:03 +0000 Subject: [PATCH] * modules/demux/dvdnav.c, modules/access/dvdplay/tools.c: on win32, remove trailing '\' if passed a drive letter. * vlc.win32.nsi: DVD and AudioCD handlers. --- modules/access/dvdplay/tools.c | 8 +++++++- modules/demux/dvdnav.c | 8 ++++++++ vlc.win32.nsi | 9 +++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/access/dvdplay/tools.c b/modules/access/dvdplay/tools.c index 06f3cc9a85..bd49d8f0ac 100644 --- a/modules/access/dvdplay/tools.c +++ b/modules/access/dvdplay/tools.c @@ -2,7 +2,7 @@ * tools.c: tools for dvd plugin. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: tools.c,v 1.4 2003/01/28 15:05:52 massiot Exp $ + * $Id$ * * Author: Stéphane Borel * @@ -107,6 +107,12 @@ char * dvdplay_ParseCL( input_thread_t * p_input, { /* Don't try to stat the file */ } + else if( psz_source[0] && psz_source[1] == ':' && + psz_source[2] == '\\' && psz_source[3] == '\0' ) + { + /* Don't try to stat the file */ + psz_source[2] = '\0'; + } else #endif { diff --git a/modules/demux/dvdnav.c b/modules/demux/dvdnav.c index 60a9688f06..fdd1cddf33 100644 --- a/modules/demux/dvdnav.c +++ b/modules/demux/dvdnav.c @@ -291,6 +291,14 @@ static char *ParseCL( vlc_object_t *p_this, char *psz_name, vlc_bool_t b_force, if( !psz_source ) return NULL; } +#ifdef WIN32 + if( psz_source[0] && psz_source[1] == ':' && + psz_source[2] == '\\' && psz_source[3] == '\0' ) + { + psz_source[2] = '\0'; + } +#endif + msg_Dbg( p_this, "dvdroot=%s title=%d chapter=%d angle=%d", psz_source, *i_title, *i_chapter, *i_angle ); diff --git a/vlc.win32.nsi b/vlc.win32.nsi index eaa46b2c63..aba1f0afff 100644 --- a/vlc.win32.nsi +++ b/vlc.win32.nsi @@ -142,6 +142,13 @@ Section "Media player (required)" SEC01 WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \ '$INSTDIR\vlc.exe "%1"' + WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player" + WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \ + '$INSTDIR\vlc.exe cdda:%1' + WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player" + WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \ + '$INSTDIR\vlc.exe dvd:%1' + SectionEnd Section "Start Menu + Desktop Shortcut" SEC02 @@ -299,6 +306,8 @@ Section Uninstall DeleteRegKey HKLM Software\VideoLAN DeleteRegKey HKCR Applications\vlc.exe + DeleteRegKey HKCR AudioCD\shell\PlayWithVLC + DeleteRegKey HKCR DVD\shell\PlayWithVLC DeleteRegKey HKLM \ SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION} -- 2.39.2