Commit ac3afe50 authored by Clément Stenac's avatar Clément Stenac

Don't notify playlist several times while preparsing

parent bf7394d3
...@@ -387,6 +387,7 @@ struct input_thread_t ...@@ -387,6 +387,7 @@ struct input_thread_t
vlc_bool_t b_eof; vlc_bool_t b_eof;
vlc_bool_t b_can_pace_control; vlc_bool_t b_can_pace_control;
vlc_bool_t b_can_pause; vlc_bool_t b_can_pause;
vlc_bool_t b_preparsing;
/* Global state */ /* Global state */
int i_state; int i_state;
......
...@@ -195,6 +195,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -195,6 +195,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
vlc_mutex_unlock( &p_input->input.p_item->lock ); vlc_mutex_unlock( &p_input->input.p_item->lock );
if( !p_input->b_preparsing )
NotifyPlaylist( p_input ); NotifyPlaylist( p_input );
} }
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -240,6 +241,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -240,6 +241,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
if( i >= p_cat->i_infos ) if( i >= p_cat->i_infos )
return VLC_EGENERIC; return VLC_EGENERIC;
if( !p_input->b_preparsing )
NotifyPlaylist( p_input ); NotifyPlaylist( p_input );
} }
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -270,6 +272,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args ) ...@@ -270,6 +272,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
p_input->input.p_item->psz_name = strdup( psz_name ); p_input->input.p_item->psz_name = strdup( psz_name );
vlc_mutex_unlock( &p_input->input.p_item->lock ); vlc_mutex_unlock( &p_input->input.p_item->lock );
if( !p_input->b_preparsing )
NotifyPlaylist( p_input ); NotifyPlaylist( p_input );
return VLC_SUCCESS; return VLC_SUCCESS;
......
This diff is collapsed.
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