Commit 737562d4 authored by Gildas Bazin's avatar Gildas Bazin

* modules/demux/dvdnav.c: a few coding style changes.

parent d2473911
...@@ -378,11 +378,15 @@ static int DemuxOpen( vlc_object_t *p_this ) ...@@ -378,11 +378,15 @@ static int DemuxOpen( vlc_object_t *p_this )
msg_Warn( p_demux, "cannot set title/chapter" ); msg_Warn( p_demux, "cannot set title/chapter" );
} }
if( !p_sys->b_simple ) /* fill p_demux field */
{ p_demux->pf_control = DemuxControl;
p_demux->pf_demux = DemuxDemux;
/* For simple mode (no menus), we're done */
if( p_sys->b_simple ) return VLC_SUCCESS;
/* Get p_input and create variable */ /* Get p_input and create variable */
p_sys->p_input = p_sys->p_input = vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_ANYWHERE );
var_Create( p_sys->p_input, "x-start", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "x-start", VLC_VAR_INTEGER );
var_Create( p_sys->p_input, "y-start", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "y-start", VLC_VAR_INTEGER );
var_Create( p_sys->p_input, "x-end", VLC_VAR_INTEGER ); var_Create( p_sys->p_input, "x-end", VLC_VAR_INTEGER );
...@@ -418,11 +422,6 @@ static int DemuxOpen( vlc_object_t *p_this ) ...@@ -418,11 +422,6 @@ static int DemuxOpen( vlc_object_t *p_this )
p_sys->p_ev->p_demux = p_demux; p_sys->p_ev->p_demux = p_demux;
vlc_thread_create( p_sys->p_ev, "dvdnav event thread handler", EventThread, vlc_thread_create( p_sys->p_ev, "dvdnav event thread handler", EventThread,
VLC_THREAD_PRIORITY_LOW, VLC_FALSE ); VLC_THREAD_PRIORITY_LOW, VLC_FALSE );
}
/* fill p_demux field */
p_demux->pf_control = DemuxControl;
p_demux->pf_demux = DemuxDemux;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -734,7 +733,8 @@ static void ButtonUpdate( demux_t *p_demux ) ...@@ -734,7 +733,8 @@ static void ButtonUpdate( demux_t *p_demux )
dvdnav_highlight_area_t hl; dvdnav_highlight_area_t hl;
int32_t i_button; int32_t i_button;
if( dvdnav_get_current_highlight( p_sys->dvdnav, &i_button ) != DVDNAV_STATUS_OK ) if( dvdnav_get_current_highlight( p_sys->dvdnav, &i_button )
!= DVDNAV_STATUS_OK )
{ {
msg_Err( p_demux, "dvdnav_get_current_highlight failed" ); msg_Err( p_demux, "dvdnav_get_current_highlight failed" );
return; return;
...@@ -769,11 +769,13 @@ static void ButtonUpdate( demux_t *p_demux ) ...@@ -769,11 +769,13 @@ static void ButtonUpdate( demux_t *p_demux )
} }
else else
{ {
msg_Dbg( p_demux, "buttonUpdate not done b=%d t=%d", i_button, i_title ); msg_Dbg( p_demux, "buttonUpdate not done b=%d t=%d",
i_button, i_title );
/* Show all */ /* Show all */
vlc_mutex_lock( p_mutex ); vlc_mutex_lock( p_mutex );
val.b_bool = VLC_FALSE; var_Set( p_sys->p_input, "highlight", val ); val.b_bool = VLC_FALSE;
var_Set( p_sys->p_input, "highlight", val );
vlc_mutex_unlock( p_mutex ); vlc_mutex_unlock( p_mutex );
} }
} }
......
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