mirror of https://code.videolan.org/videolan/vlc
lib: return the same object in libvlc_media_player_retain()
This commit is contained in:
parent
2ad8ef54bb
commit
098855b2b5
|
@ -191,8 +191,9 @@ LIBVLC_API void libvlc_media_player_release( libvlc_media_player_t *p_mi );
|
|||
* libvlc_media_player_release() to decrement reference count.
|
||||
*
|
||||
* \param p_mi media player object
|
||||
* \return the same object
|
||||
*/
|
||||
LIBVLC_API void libvlc_media_player_retain( libvlc_media_player_t *p_mi );
|
||||
LIBVLC_API libvlc_media_player_t *libvlc_media_player_retain( libvlc_media_player_t *p_mi );
|
||||
|
||||
/**
|
||||
* Set the media that will be used by the media_player. If any,
|
||||
|
|
|
@ -871,10 +871,11 @@ void libvlc_media_player_release( libvlc_media_player_t *p_mi )
|
|||
*
|
||||
* Caller must hold the lock.
|
||||
**************************************************************************/
|
||||
void libvlc_media_player_retain( libvlc_media_player_t *p_mi )
|
||||
libvlc_media_player_t *libvlc_media_player_retain( libvlc_media_player_t *p_mi )
|
||||
{
|
||||
assert( p_mi );
|
||||
vlc_atomic_rc_inc( &p_mi->rc );
|
||||
return p_mi;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
Loading…
Reference in New Issue