/*****************************************************************************
* dvdnav.c: DVD module using the dvdnav library.
*****************************************************************************
- * Copyright (C) 2004 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2004 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
if( !p_this->b_force ) return VLC_EGENERIC;
psz_name = var_CreateGetString( p_this, "dvd" );
- if( !psz_name || !*psz_name )
+ if( !psz_name )
{
- if( psz_name ) free( psz_name );
- return VLC_EGENERIC;
+ psz_name = strdup("");
}
}
- else psz_name = strdup( p_demux->psz_path );
+ else
+ psz_name = strdup( p_demux->psz_path );
#ifdef WIN32
if( psz_name[0] && psz_name[1] == ':' &&
*/
DemuxBlock( p_demux, packet, i_len );
if( p_sys->b_spu_change )
- {
- ButtonUpdate( p_demux, VLC_FALSE );
- p_sys->b_spu_change = VLC_FALSE;
- }
+ {
+ ButtonUpdate( p_demux, VLC_FALSE );
+ p_sys->b_spu_change = VLC_FALSE;
+ }
break;
}
uint16_t i_tag_id = 0;
int i_fd, i_ret;
+ if( !*psz_name )
+ {
+ /* Triggers libdvdcss autodetection */
+ return VLC_SUCCESS;
+ }
+
if( stat( psz_name, &stat_info ) || !S_ISREG( stat_info.st_mode ) )
{
/* Let dvdnav_open() do the probing */