Commit a3e989d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove the last direct use of object_wait

parent 337933ee
......@@ -142,6 +142,16 @@ extern void *
vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
const char *psz_type);
/* Signal an object without checking for locking consistency. This is wrong. */
#ifdef __GNUC__
__attribute__((deprecated))
#endif
static inline void
vlc_object_signal_maybe (vlc_object_t *p_this)
{
vlc_cond_signal (&p_this->object_wait);
}
/**
* libvlc_global_data_t (global variable)
*
......
......@@ -162,7 +162,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
return VLC_EBADVAR;
break;
}
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_playlist) );
return VLC_SUCCESS;
}
......
......@@ -724,7 +724,7 @@ int playlist_TreeMove( playlist_t * p_playlist, playlist_item_t *p_item,
else
i_ret = TreeMove( p_playlist, p_item, p_node, i_newpos );
p_playlist->b_reset_currently_playing = true;
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_playlist) );
return i_ret;
}
......@@ -750,7 +750,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
val.p_address = p_add;
p_playlist->b_reset_currently_playing = true;
if( b_signal )
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( p_playlist );
var_Set( p_playlist, "item-append", val );
free( p_add );
}
......@@ -808,7 +808,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
if( p_playlist->p_input )
input_StopThread( p_playlist->p_input );
p_playlist->request.i_status = PLAYLIST_RUNNING;
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_playlist) );
}
/* Preparse if PREPARSE or SPREPARSE & not enough meta */
char *psz_artist = input_item_GetArtist( p_item_cat->p_input );
......@@ -890,7 +890,7 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
p_playlist->request.b_request = true;
p_playlist->request.p_item = NULL;
msg_Info( p_playlist, "stopping playback" );
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_playlist) );
}
b_delay_deletion = true;
}
......
......@@ -167,6 +167,6 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
{
p_playlist->b_reset_currently_playing = true;
playlist_LiveSearchUpdateInternal( p_playlist, p_root, psz_string );
vlc_cond_signal( &p_playlist->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_playlist) );
return VLC_SUCCESS;
}
......@@ -544,7 +544,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
{
msg_Err( p_vout, "Could not get snapshot" );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
vlc_object_release( p_dest );
return VLC_EGENERIC;
}
......@@ -556,7 +556,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
{
block_Release( p_block );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
vlc_object_release( p_dest );
return VLC_ENOMEM;
}
......@@ -573,7 +573,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
block_Release( p_block );
free( p_snapshot );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
vlc_object_release( p_dest );
return VLC_ENOMEM;
}
......@@ -584,7 +584,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
block_Release( p_block );
/* Unlock the object */
vlc_cond_signal( &p_dest->object_wait );
vlc_object_signal_maybe( VLC_OBJECT(p_dest) );
vlc_object_release( p_dest );
image_HandlerDelete( p_image );
......
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