Commit 5960b182 authored by Christophe Massiot's avatar Christophe Massiot

We are now able to parse :

dvdread:/Volumes/to@to/VIDEO_TS@1,1
dvdplay:/Volumes/to@to/VIDEO_TS@1,1
Closes #77
parent 38b7295a
......@@ -2,7 +2,7 @@
* access.c: access capabilities for dvdplay plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: access.c,v 1.9 2002/12/31 01:54:35 massiot Exp $
* $Id: access.c,v 1.10 2003/01/28 15:05:52 massiot Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -109,16 +109,17 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
/* Open libdvdplay */
p_dvd->vmg = dvdplay_open( psz_source, pf_vmg_callback, (void*)p_input );
/* free allocated strings */
free( psz_source );
if( p_dvd->vmg == NULL )
{
msg_Err( p_input, "cannot open %s", psz_source );
free( psz_source );
free( p_dvd );
return -1;
}
/* free allocated strings */
free( psz_source );
p_dvd->p_intf = NULL;
p_dvd->i_still_time = 0;
......
......@@ -2,7 +2,7 @@
* tools.c: tools for dvd plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: tools.c,v 1.3 2002/10/28 16:26:44 sam Exp $
* $Id: tools.c,v 1.4 2003/01/28 15:05:52 massiot Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -52,22 +52,24 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
p_dvd = (dvd_data_t*)(p_input->p_access_data);
psz_parser = psz_source = strdup( p_input->psz_name );
if( !psz_parser )
psz_source = strdup( p_input->psz_name );
if( psz_source == NULL )
{
return NULL;
}
while( *psz_parser && *psz_parser != '@' )
{
psz_parser++;
}
*i_title = 0;
*i_chapter = 1;
*i_angle = 1;
if( *psz_parser == '@' )
/* Start with the end, because you could have :
* dvdplay:/Volumes/my@toto/VIDEO_TS@1,1
* (yes, this is kludgy). */
for ( psz_parser = psz_source + strlen(psz_source) - 1;
psz_parser >= psz_source && *psz_parser != '@';
psz_parser-- );
if( psz_parser >= psz_source && *psz_parser == '@' )
{
/* Found options */
*psz_parser = '\0';
......
......@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input.c,v 1.14 2003/01/23 15:50:15 sam Exp $
* $Id: input.c,v 1.15 2003/01/28 15:05:52 massiot Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -248,8 +248,8 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
unsigned int i_angle = 1;
unsigned int i;
psz_parser = psz_source = strdup( p_input->psz_name );
if( !psz_source )
psz_source = strdup( p_input->psz_name );
if( psz_source == NULL )
{
return VLC_ENOMEM;
}
......@@ -259,12 +259,14 @@ int E_(OpenDVD) ( vlc_object_t *p_this )
p_input->pf_set_area = DvdReadSetArea;
p_input->pf_set_program = DvdReadSetProgram;
while( *psz_parser && *psz_parser != '@' )
{
psz_parser++;
}
/* Start with the end, because you could have :
* dvdread:/Volumes/my@toto/VIDEO_TS@1,1
* (yes, this is kludgy). */
for ( psz_parser = psz_source + strlen(psz_source) - 1;
psz_parser >= psz_source && *psz_parser != '@';
psz_parser-- );
if( *psz_parser == '@' )
if( psz_parser >= psz_source && *psz_parser == '@' )
{
/* Found options */
*psz_parser = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment