Commit 658039e1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Cache the input state and properly ask the ugly timer to sync with it.

Should fix #1836 (OSX "waiting" progressbar sometimes doesn't restore to normal state when file starts)
parent 6ab2c446
......@@ -304,6 +304,8 @@ struct intf_sys_t
int i_lastShownVolume;
input_state_e cachedInputState;
/* the manage thread */
pthread_t manage_thread;
......
......@@ -1221,6 +1221,7 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
pl_Release( p_intf );
vlc_object_lock( p_intf );
while( vlc_object_alive( p_intf ) )
{
vlc_mutex_lock( &p_intf->change_lock );
......@@ -1245,6 +1246,10 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
vlc_object_release( p_input );
p_input = NULL;
}
else if( cachedInputState != input_GetState( p_input ) )
{
p_intf->p_sys->b_intf_update = true;
}
/* Manage volume status */
[self manageVolumeSlider];
......@@ -1304,10 +1309,10 @@ static NSString * VLCToolbarMediaControl = @"VLCToolbarMediaControl";
if( ( b_input = ( p_input != NULL ) ) )
{
/* seekable streams */
int state = input_GetState( p_input );
if ( state == INIT_S ||
state == OPENING_S ||
state == BUFFERING_S )
cachedInputState = input_GetState( p_input );
if ( cachedInputState == INIT_S ||
cachedInputState == OPENING_S ||
cachedInputState == BUFFERING_S )
{
b_buffering = YES;
}
......
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