Commit 0b8ec7ae authored by Rémi Duraffort's avatar Rémi Duraffort

Use var_Get* when applicable.

parent 160324c6
This diff is collapsed.
...@@ -183,7 +183,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -183,7 +183,6 @@ static int Open( vlc_object_t *p_this )
int i_angle; int i_angle;
char *psz_name; char *psz_name;
char *psz_code; char *psz_code;
vlc_value_t val;
if( !p_demux->psz_path || !*p_demux->psz_path ) if( !p_demux->psz_path || !*p_demux->psz_path )
{ {
...@@ -303,9 +302,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -303,9 +302,7 @@ static int Open( vlc_object_t *p_this )
DemuxTitles( p_demux ); DemuxTitles( p_demux );
var_Create( p_demux, "dvdnav-menu", VLC_VAR_BOOL|VLC_VAR_DOINHERIT ); if( var_CreateGetBool( p_demux, "dvdnav-menu" ) )
var_Get( p_demux, "dvdnav-menu", &val );
if( val.b_bool )
{ {
msg_Dbg( p_demux, "trying to go to dvd menu" ); msg_Dbg( p_demux, "trying to go to dvd menu" );
...@@ -330,9 +327,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -330,9 +327,8 @@ static int Open( vlc_object_t *p_this )
} }
} }
var_Create( p_demux, "dvdnav-angle", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); i_angle = var_CreateGetInteger( p_demux, "dvdnav-angle" );
var_Get( p_demux, "dvdnav-angle", &val ); if( i_angle <= 0 ) i_angle = 1;
i_angle = val.i_int > 0 ? val.i_int : 1;
/* Update default_pts to a suitable value for dvdnav access */ /* Update default_pts to a suitable value for dvdnav access */
var_Create( p_demux, "dvdnav-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); var_Create( p_demux, "dvdnav-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
......
...@@ -201,7 +201,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -201,7 +201,6 @@ static int Open( vlc_object_t *p_this )
char *psz_dvdcss_env; char *psz_dvdcss_env;
dvd_reader_t *p_dvdread; dvd_reader_t *p_dvdread;
ifo_handle_t *p_vmg_file; ifo_handle_t *p_vmg_file;
vlc_value_t val;
if( !p_demux->psz_path || !*p_demux->psz_path ) if( !p_demux->psz_path || !*p_demux->psz_path )
{ {
...@@ -280,9 +279,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -280,9 +279,8 @@ static int Open( vlc_object_t *p_this )
p_sys->i_title = p_sys->i_chapter = -1; p_sys->i_title = p_sys->i_chapter = -1;
p_sys->i_mux_rate = 0; p_sys->i_mux_rate = 0;
var_Create( p_demux, "dvdread-angle", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); p_sys->i_angle = var_CreateGetInteger( p_demux, "dvdread-angle" );
var_Get( p_demux, "dvdread-angle", &val ); if( p_sys->i_angle <= 0 ) p_sys->i_angle = 1;
p_sys->i_angle = val.i_int > 0 ? val.i_int : 1;
DemuxTitles( p_demux, &p_sys->i_angle ); DemuxTitles( p_demux, &p_sys->i_angle );
if( DvdReadSetArea( p_demux, 0, 0, p_sys->i_angle ) != VLC_SUCCESS ) if( DvdReadSetArea( p_demux, 0, 0, p_sys->i_angle ) != VLC_SUCCESS )
......
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