Commit ae904d83 authored by Sergey Radionov's avatar Sergey Radionov Committed by Rémi Denis-Courmont

fixed threading issue in libvlc_media_player_get_media

and some cosmetics
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent dac22c2a
......@@ -691,12 +691,13 @@ libvlc_media_player_get_media( libvlc_media_player_t *p_mi )
{
libvlc_media_t *p_m;
lock(p_mi);
lock( p_mi );
p_m = p_mi->p_md;
if( p_m )
libvlc_media_retain( p_mi->p_md );
unlock(p_mi);
return p_mi->p_md;
libvlc_media_retain( p_m );
unlock( p_mi );
return p_m;
}
/**************************************************************************
......
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