/*****************************************************************************
* dvdnav.c: DVD module using the dvdnav library.
*****************************************************************************
- * Copyright (C) 2004 VideoLAN
+ * Copyright (C) 2004 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
/* palette for menus */
uint32_t clut[16];
uint8_t palette[4][4];
+ vlc_bool_t b_spu_change;
/* */
int i_aspect;
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] == ':' &&
p_sys->i_aspect = -1;
p_sys->i_mux_rate = 0;
p_sys->i_pgc_length = 0;
+ p_sys->b_spu_change = VLC_FALSE;
if( 1 )
{
event->physical_pan_scan );
ESSubtitleUpdate( p_demux );
+ p_sys->b_spu_change = VLC_TRUE;
/* HACK to get the SPU tracks registered in the right order */
for( i = 0; i < 0x1f; i++ )
* - ...
*/
DemuxBlock( p_demux, packet, i_len );
- ButtonUpdate( p_demux, VLC_FALSE );
+ if( p_sys->b_spu_change )
+ {
+ ButtonUpdate( p_demux, VLC_FALSE );
+ p_sys->b_spu_change = VLC_FALSE;
+ }
break;
}
msg_Dbg( p_demux, "DVDNAV_HIGHLIGHT" );
msg_Dbg( p_demux, " - display=%d", event->display );
msg_Dbg( p_demux, " - buttonN=%d", event->buttonN );
- ButtonUpdate( p_demux, 0 );
+ ButtonUpdate( p_demux, VLC_FALSE );
break;
}
int i_spu = dvdnav_get_active_spu_stream( p_sys->dvdnav );
int32_t i_title, i_part;
- ButtonUpdate( p_demux, 0 );
+ ButtonUpdate( p_demux, VLC_FALSE );
dvdnav_current_title_info( p_sys->dvdnav, &i_title, &i_part );
if( i_title > 0 ) return;
}
tk->b_seen = VLC_TRUE;
- if( tk->fmt.i_cat == VIDEO_ES ) ButtonUpdate( p_demux, 0 );
+ if( tk->fmt.i_cat == VIDEO_ES ) ButtonUpdate( p_demux, VLC_FALSE );
}
/*****************************************************************************
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 */