Commit 7060dbb9 authored by Antoine Cellerier's avatar Antoine Cellerier

s/vlc_object_yield/vlc_object_release/

As discussed on IRC. Yield was quite confusing.
parent e6103805
...@@ -84,7 +84,7 @@ __attribute__((deprecated)) ...@@ -84,7 +84,7 @@ __attribute__((deprecated))
#endif #endif
VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) ); VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( vlc_object_t *, vlc_object_find_name, ( vlc_object_t *, const char *, int ) ); VLC_EXPORT( vlc_object_t *, vlc_object_find_name, ( vlc_object_t *, const char *, int ) );
VLC_EXPORT( void *, __vlc_object_yield, ( vlc_object_t * ) ); VLC_EXPORT( void *, __vlc_object_hold, ( vlc_object_t * ) );
VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) ); VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
VLC_EXPORT( vlc_list_t *, __vlc_list_children, ( vlc_object_t * ) ); VLC_EXPORT( vlc_list_t *, __vlc_list_children, ( vlc_object_t * ) );
...@@ -110,8 +110,8 @@ VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) ); ...@@ -110,8 +110,8 @@ VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
#define vlc_object_find_name(a,b,c) \ #define vlc_object_find_name(a,b,c) \
vlc_object_find_name( VLC_OBJECT(a),b,c) vlc_object_find_name( VLC_OBJECT(a),b,c)
#define vlc_object_yield(a) \ #define vlc_object_hold(a) \
(typeof(a))__vlc_object_yield( VLC_OBJECT(a) ) (typeof(a))__vlc_object_hold( VLC_OBJECT(a) )
#define vlc_object_release(a) \ #define vlc_object_release(a) \
__vlc_object_release( VLC_OBJECT(a) ) __vlc_object_release( VLC_OBJECT(a) )
......
...@@ -322,7 +322,7 @@ DBUS_METHOD( Play ) ...@@ -322,7 +322,7 @@ DBUS_METHOD( Play )
PL_LOCK; PL_LOCK;
input_thread_t *p_input = p_playlist->p_input; input_thread_t *p_input = p_playlist->p_input;
if( p_input ) if( p_input )
vlc_object_yield( p_input ); vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
if( p_input ) if( p_input )
...@@ -807,7 +807,7 @@ static void Close ( vlc_object_t *p_this ) ...@@ -807,7 +807,7 @@ static void Close ( vlc_object_t *p_this )
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
if ( p_input ) if ( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
var_DelCallback( p_input, "state", StateChange, p_intf ); var_DelCallback( p_input, "state", StateChange, p_intf );
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
...@@ -1006,7 +1006,7 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var, ...@@ -1006,7 +1006,7 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
vlc_object_yield( p_input ); vlc_object_hold( p_input );
pl_Release( p_intf ); pl_Release( p_intf );
p_item = input_GetItem( p_input ); p_item = input_GetItem( p_input );
......
...@@ -144,7 +144,7 @@ static input_thread_t * input_from_playlist ( playlist_t *p_playlist ) ...@@ -144,7 +144,7 @@ static input_thread_t * input_from_playlist ( playlist_t *p_playlist )
PL_LOCK; PL_LOCK;
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
if( p_input ) if( p_input )
vlc_object_yield( p_input ); vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
return p_input; return p_input;
......
...@@ -177,7 +177,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -177,7 +177,7 @@ static void Run( intf_thread_t *p_intf )
PL_LOCK; PL_LOCK;
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
if( p_input ) if( p_input )
vlc_object_yield( p_input ); vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
/* Update the vout */ /* Update the vout */
......
...@@ -387,7 +387,7 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer, ...@@ -387,7 +387,7 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
p_sys->p_input = p_sys->p_playlist->p_input; p_sys->p_input = p_sys->p_playlist->p_input;
if( p_sys->p_input ) if( p_sys->p_input )
{ {
vlc_object_yield( p_sys->p_input ); vlc_object_hold( p_sys->p_input );
var_Get( p_sys->p_input, "position", &val); var_Get( p_sys->p_input, "position", &val);
sprintf( position, "%d" , (int)((val.f_float) * 100.0)); sprintf( position, "%d" , (int)((val.f_float) * 100.0));
var_Get( p_sys->p_input, "time", &val); var_Get( p_sys->p_input, "time", &val);
......
...@@ -1084,7 +1084,7 @@ ...@@ -1084,7 +1084,7 @@
if( self != nil ) if( self != nil )
{ {
psz_name = strdup( name ); psz_name = strdup( name );
_vlc_object = vlc_object_yield( object ); _vlc_object = vlc_object_hold( object );
value = val; value = val;
i_type = type; i_type = type;
} }
...@@ -1111,7 +1111,7 @@ ...@@ -1111,7 +1111,7 @@
- (vlc_object_t *)vlcObject - (vlc_object_t *)vlcObject
{ {
return vlc_object_yield( _vlc_object ); return vlc_object_hold( _vlc_object );
} }
......
...@@ -271,7 +271,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -271,7 +271,7 @@ static VLCTreeItem *o_root_item = nil;
o_name = [o_item_name copy]; o_name = [o_item_name copy];
o_title= [o_item_title copy]; o_title= [o_item_title copy];
o_help= [o_item_help copy]; o_help= [o_item_help copy];
_vlc_object = object ? vlc_object_yield( object ) : NULL; _vlc_object = object ? vlc_object_hold( object ) : NULL;
o_parent = o_parent_item; o_parent = o_parent_item;
o_children = o_children_array; o_children = o_children_array;
i_object_category = i_category; i_object_category = i_category;
...@@ -482,7 +482,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -482,7 +482,7 @@ static VLCTreeItem *o_root_item = nil;
- (vlc_object_t *)vlcObject - (vlc_object_t *)vlcObject
{ {
return vlc_object_yield(_vlc_object); return vlc_object_hold(_vlc_object);
} }
- (NSString *)name - (NSString *)name
......
...@@ -417,7 +417,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -417,7 +417,7 @@ static void Run( intf_thread_t *p_intf )
{ {
if( !p_sys->p_input->b_dead ) if( !p_sys->p_input->b_dead )
{ {
vlc_object_yield( p_sys->p_input ); vlc_object_hold( p_sys->p_input );
} }
} }
} }
......
...@@ -153,7 +153,7 @@ void MediaInfoDialog::update( input_thread_t *p_input ) ...@@ -153,7 +153,7 @@ void MediaInfoDialog::update( input_thread_t *p_input )
} }
/* Launch the update in all the panels */ /* Launch the update in all the panels */
vlc_object_yield( p_input ); vlc_object_hold( p_input );
update( input_GetItem(p_input), true, true); update( input_GetItem(p_input), true, true);
...@@ -171,7 +171,7 @@ void MediaInfoDialog::updateOnTimeOut() ...@@ -171,7 +171,7 @@ void MediaInfoDialog::updateOnTimeOut()
if( p_input && !p_input->b_dead ) if( p_input && !p_input->b_dead )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
update( input_GetItem(p_input), false, false); update( input_GetItem(p_input), false, false);
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
......
...@@ -87,7 +87,7 @@ void InputManager::setInput( input_thread_t *_p_input ) ...@@ -87,7 +87,7 @@ void InputManager::setInput( input_thread_t *_p_input )
p_input = _p_input; p_input = _p_input;
if( p_input && !( p_input->b_dead || !vlc_object_alive (p_input) ) ) if( p_input && !( p_input->b_dead || !vlc_object_alive (p_input) ) )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
emit statusChanged( PLAYING_S ); emit statusChanged( PLAYING_S );
UpdateMeta(); UpdateMeta();
UpdateArt(); UpdateArt();
...@@ -650,7 +650,7 @@ void MainInputManager::customEvent( QEvent *event ) ...@@ -650,7 +650,7 @@ void MainInputManager::customEvent( QEvent *event )
p_input = THEPL->p_input; p_input = THEPL->p_input;
if( p_input && !( !vlc_object_alive (p_input) || p_input->b_dead) ) if( p_input && !( !vlc_object_alive (p_input) || p_input->b_dead) )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
var_AddCallback( p_input, "state", PLItemChanged, this ); var_AddCallback( p_input, "state", PLItemChanged, this );
emit inputChanged( p_input ); emit inputChanged( p_input );
} }
......
...@@ -464,7 +464,7 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current ) ...@@ -464,7 +464,7 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
p_input = THEMIM->getInput(); p_input = THEMIM->getInput();
if( p_input ) if( p_input )
vlc_object_yield( p_input ); vlc_object_hold( p_input );
p_aout = ( vlc_object_t * ) vlc_object_find( p_intf, p_aout = ( vlc_object_t * ) vlc_object_find( p_intf,
VLC_OBJECT_AOUT, VLC_OBJECT_AOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -519,7 +519,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current ) ...@@ -519,7 +519,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
p_input = THEMIM->getInput(); p_input = THEMIM->getInput();
if( p_input ) if( p_input )
vlc_object_yield( p_input ); vlc_object_hold( p_input );
p_vout = ( vlc_object_t * )vlc_object_find( p_intf, VLC_OBJECT_VOUT, p_vout = ( vlc_object_t * )vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -713,7 +713,7 @@ void QVLCMenu::VideoPopupMenu( intf_thread_t *p_intf ) ...@@ -713,7 +713,7 @@ void QVLCMenu::VideoPopupMenu( intf_thread_t *p_intf )
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
vlc_object_t *p_vout = ( vlc_object_t * )vlc_object_find( p_input, vlc_object_t *p_vout = ( vlc_object_t * )vlc_object_find( p_input,
VLC_OBJECT_VOUT, FIND_CHILD ); VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout ) if( p_vout )
...@@ -733,7 +733,7 @@ void QVLCMenu::AudioPopupMenu( intf_thread_t *p_intf ) ...@@ -733,7 +733,7 @@ void QVLCMenu::AudioPopupMenu( intf_thread_t *p_intf )
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
vlc_object_t *p_aout = ( vlc_object_t * )vlc_object_find( p_input, vlc_object_t *p_aout = ( vlc_object_t * )vlc_object_find( p_input,
VLC_OBJECT_AOUT, FIND_ANYWHERE ); VLC_OBJECT_AOUT, FIND_ANYWHERE );
AudioAutoMenuBuilder( p_aout, p_input, objects, varnames ); AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
...@@ -753,7 +753,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf ) ...@@ -753,7 +753,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
varnames.push_back( "audio-es" ); varnames.push_back( "audio-es" );
InputAutoMenuBuilder( VLC_OBJECT( p_input ), objects, varnames ); InputAutoMenuBuilder( VLC_OBJECT( p_input ), objects, varnames );
PUSH_SEPARATOR; PUSH_SEPARATOR;
...@@ -814,7 +814,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -814,7 +814,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
menu->addSeparator(); menu->addSeparator();
vlc_object_yield( p_input ); vlc_object_hold( p_input );
InputAutoMenuBuilder( VLC_OBJECT( p_input ), objects, varnames ); InputAutoMenuBuilder( VLC_OBJECT( p_input ), objects, varnames );
vlc_object_release( p_input ); vlc_object_release( p_input );
......
...@@ -330,7 +330,7 @@ void VlcProc::refreshInput() ...@@ -330,7 +330,7 @@ void VlcProc::refreshInput()
{ {
getIntf()->p_sys->p_input = getIntf()->p_sys->p_playlist->p_input; getIntf()->p_sys->p_input = getIntf()->p_sys->p_playlist->p_input;
if( getIntf()->p_sys->p_input ) if( getIntf()->p_sys->p_input )
vlc_object_yield( getIntf()->p_sys->p_input ); vlc_object_hold( getIntf()->p_sys->p_input );
} }
else if( getIntf()->p_sys->p_input->b_dead ) else if( getIntf()->p_sys->p_input->b_dead )
{ {
......
...@@ -129,7 +129,7 @@ void FileInfo::Update() ...@@ -129,7 +129,7 @@ void FileInfo::Update()
} }
pl_Release( p_intf ); pl_Release( p_intf );
vlc_object_yield( p_input ); vlc_object_hold( p_input );
vlc_mutex_lock( &input_GetItem(p_input)->lock ); vlc_mutex_lock( &input_GetItem(p_input)->lock );
if( b_need_update == true ) if( b_need_update == true )
{ {
......
...@@ -143,7 +143,7 @@ void VLMBroadcastStreamPanel::OnPlay( wxCommandEvent &event ) ...@@ -143,7 +143,7 @@ void VLMBroadcastStreamPanel::OnPlay( wxCommandEvent &event )
p_stream->p_media->instance[0]->p_input ) p_stream->p_media->instance[0]->p_input )
{ {
vlc_value_t val; vlc_value_t val;
vlc_object_yield( p_stream->p_media->instance[0]->p_input ); vlc_object_hold( p_stream->p_media->instance[0]->p_input );
var_Get( p_stream->p_media->instance[0]->p_input, "state", &val ); var_Get( p_stream->p_media->instance[0]->p_input, "state", &val );
if( val.i_int != PAUSE_S ) if( val.i_int != PAUSE_S )
{ {
......
...@@ -200,7 +200,7 @@ void InputManager::UpdateInput() ...@@ -200,7 +200,7 @@ void InputManager::UpdateInput()
LockPlaylist( p_intf->p_sys, p_playlist ); LockPlaylist( p_intf->p_sys, p_playlist );
p_input = p_intf->p_sys->p_input = p_playlist->p_input; p_input = p_intf->p_sys->p_input = p_playlist->p_input;
if( p_intf->p_sys->p_input ) if( p_intf->p_sys->p_input )
vlc_object_yield( p_intf->p_sys->p_input ); vlc_object_hold( p_intf->p_sys->p_input );
UnlockPlaylist( p_intf->p_sys, p_playlist ); UnlockPlaylist( p_intf->p_sys, p_playlist );
pl_Release( p_intf ); pl_Release( p_intf );
} }
......
...@@ -282,7 +282,7 @@ void VideoPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -282,7 +282,7 @@ void VideoPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
as_varnames.Add( "video-es" ); as_varnames.Add( "video-es" );
ai_objects.Add( p_input->i_object_id ); ai_objects.Add( p_input->i_object_id );
as_varnames.Add( "spu-es" ); as_varnames.Add( "spu-es" );
...@@ -306,7 +306,7 @@ void AudioPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -306,7 +306,7 @@ void AudioPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
as_varnames.Add( "audio-es" ); as_varnames.Add( "audio-es" );
ai_objects.Add( p_input->i_object_id ); ai_objects.Add( p_input->i_object_id );
vlc_object_t *p_aout = (vlc_object_t *)vlc_object_find( p_input, vlc_object_t *p_aout = (vlc_object_t *)vlc_object_find( p_input,
...@@ -330,7 +330,7 @@ void MiscPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -330,7 +330,7 @@ void MiscPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
as_varnames.Add( "audio-es" ); as_varnames.Add( "audio-es" );
InputAutoMenuBuilder( VLC_OBJECT(p_input), ai_objects, as_varnames ); InputAutoMenuBuilder( VLC_OBJECT(p_input), ai_objects, as_varnames );
PUSH_SEPARATOR; PUSH_SEPARATOR;
...@@ -357,7 +357,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -357,7 +357,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
POPUP_BOILERPLATE; POPUP_BOILERPLATE;
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
InputAutoMenuBuilder( VLC_OBJECT(p_input), ai_objects, as_varnames ); InputAutoMenuBuilder( VLC_OBJECT(p_input), ai_objects, as_varnames );
/* Video menu */ /* Video menu */
......
...@@ -215,7 +215,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -215,7 +215,7 @@ static void Close( vlc_object_t *p_this )
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
if ( p_input ) if ( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_hold( p_input );
if( p_sys->b_state_cb ) if( p_sys->b_state_cb )
var_DelCallback( p_input, "state", PlayingChange, p_intf ); var_DelCallback( p_input, "state", PlayingChange, p_intf );
...@@ -516,7 +516,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -516,7 +516,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
vlc_object_yield( p_input ); vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_intf ); pl_Release( p_intf );
...@@ -930,7 +930,7 @@ static int ReadMetaData( intf_thread_t *p_this ) ...@@ -930,7 +930,7 @@ static int ReadMetaData( intf_thread_t *p_this )
return( VLC_SUCCESS ); return( VLC_SUCCESS );
} }
vlc_object_yield( p_input ); vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_this ); pl_Release( p_this );
......
...@@ -51,7 +51,7 @@ input_thread_t * vlclua_get_input_internal( lua_State *L ) ...@@ -51,7 +51,7 @@ input_thread_t * vlclua_get_input_internal( lua_State *L )
playlist_t *p_playlist = vlclua_get_playlist_internal( L ); playlist_t *p_playlist = vlclua_get_playlist_internal( L );
PL_LOCK; PL_LOCK;
input_thread_t *p_input = p_playlist->p_input; input_thread_t *p_input = p_playlist->p_input;
if( p_input ) vlc_object_yield( p_input ); if( p_input ) vlc_object_hold( p_input );
PL_UNLOCK; PL_UNLOCK;
vlclua_release_playlist_internal( p_playlist ); vlclua_release_playlist_internal( p_playlist );
return p_input; return p_input;
......
...@@ -165,7 +165,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -165,7 +165,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
pl_Release( p_this ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_hold( p_input );
char *psz_name = input_item_GetName( input_GetItem( p_input ) ); char *psz_name = input_item_GetName( input_GetItem( p_input ) );
if( p_input->b_dead || !psz_name ) if( p_input->b_dead || !psz_name )
......
...@@ -127,7 +127,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -127,7 +127,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
pl_Release( p_this ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_hold( p_input );
char *psz_name = input_item_GetName( input_GetItem( p_input ) ); char *psz_name = input_item_GetName( input_GetItem( p_input ) );
if( p_input->b_dead || !psz_name ) if( p_input->b_dead || !psz_name )
......
...@@ -148,7 +148,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -148,7 +148,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
pl_Release( p_this ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_hold( p_input );
if( p_input->b_dead || !input_GetItem(p_input)->psz_name ) if( p_input->b_dead || !input_GetItem(p_input)->psz_name )
{ {
......
...@@ -149,7 +149,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -149,7 +149,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
intf_sys_t *p_sys = p_intf->p_sys; intf_sys_t *p_sys = p_intf->p_sys;
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_hold( p_input );
if( p_input->b_dead ) if( p_input->b_dead )
{ {
......
...@@ -193,7 +193,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -193,7 +193,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_hold( p_input );
if( p_input->b_dead || !input_GetItem(p_input)->psz_name ) if( p_input->b_dead || !input_GetItem(p_input)->psz_name )
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -129,7 +129,7 @@ input_thread_t *libvlc_get_input_thread( libvlc_media_player_t *p_mi, ...@@ -129,7 +129,7 @@ input_thread_t *libvlc_get_input_thread( libvlc_media_player_t *p_mi,
} }
p_input_thread = p_mi->p_input_thread; p_input_thread = p_mi->p_input_thread;
vlc_object_yield( p_input_thread ); vlc_object_hold( p_input_thread );
vlc_mutex_unlock( &p_mi->object_lock ); vlc_mutex_unlock( &p_mi->object_lock );
...@@ -430,7 +430,7 @@ libvlc_media_player_t * libvlc_media_player_new_from_input_thread( ...@@ -430,7 +430,7 @@ libvlc_media_player_t * libvlc_media_player_new_from_input_thread(
} }
/* will be released in media_player_release() */ /* will be released in media_player_release() */
vlc_object_yield( p_input ); vlc_object_hold( p_input );
p_mi->p_input_thread = p_input; p_mi->p_input_thread = p_input;
p_mi->b_own_its_input_thread = false; p_mi->b_own_its_input_thread = false;
......
...@@ -85,7 +85,7 @@ vlm_t *__vlm_New ( vlc_object_t *p_this ) ...@@ -85,7 +85,7 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
p_vlm = *pp_vlm; p_vlm = *pp_vlm;
if( p_vlm ) if( p_vlm )
{ /* VLM already exists */ { /* VLM already exists */
vlc_object_yield( p_vlm ); vlc_object_hold( p_vlm );
vlc_mutex_unlock( lockval.p_address ); vlc_mutex_unlock( lockval.p_address );
return p_vlm; return p_vlm;
} }
......
...@@ -410,7 +410,7 @@ static interaction_t * InteractionGet( vlc_object_t *p_this ) ...@@ -410,7 +410,7 @@ static interaction_t * InteractionGet( vlc_object_t *p_this )
{ {
interaction_t *obj = libvlc_priv(p_this->p_libvlc)->p_interaction; interaction_t *obj = libvlc_priv(p_this->p_libvlc)->p_interaction;
if( obj ) if( obj )
vlc_object_yield( obj ); vlc_object_hold( obj );
return obj; return obj;
} }
...@@ -612,7 +612,7 @@ static void InteractionManage( interaction_t *p_interaction ) ...@@ -612,7 +612,7 @@ static void InteractionManage( interaction_t *p_interaction )
} }
} }
else else
vlc_object_yield( p_interaction->p_intf ); vlc_object_hold( p_interaction->p_intf );
for( i_index = 0 ; i_index < p_interaction->i_dialogs; i_index ++ ) for( i_index = 0 ; i_index < p_interaction->i_dialogs; i_index ++ )
{ {
......
...@@ -481,7 +481,7 @@ __vlc_object_signal_unlocked ...@@ -481,7 +481,7 @@ __vlc_object_signal_unlocked
__vlc_object_unlock __vlc_object_unlock
__vlc_object_wait __vlc_object_wait
__vlc_object_waitpipe __vlc_object_waitpipe
__vlc_object_yield __vlc_object_hold
vlc_poll vlc_poll
vlc_rand_bytes vlc_rand_bytes
vlc_recvmsg vlc_recvmsg
......
...@@ -525,7 +525,7 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) ...@@ -525,7 +525,7 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode )
/* If we are of the requested type ourselves, don't look further */ /* If we are of the requested type ourselves, don't look further */
if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type ) if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type )
{ {
vlc_object_yield( p_this ); vlc_object_hold( p_this );
return p_this; return p_this;
} }
...@@ -574,7 +574,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, ...@@ -574,7 +574,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this,
&& p_this->psz_object_name && p_this->psz_object_name
&& !strcmp( p_this->psz_object_name, psz_name ) ) && !strcmp( p_this->psz_object_name, psz_name ) )
{ {
vlc_object_yield( p_this ); vlc_object_hold( p_this );
return p_this; return p_this;
} }