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: default avatarRémi Denis-Courmont <remi@remlab.net>
parent dac22c2a
...@@ -691,12 +691,13 @@ libvlc_media_player_get_media( libvlc_media_player_t *p_mi ) ...@@ -691,12 +691,13 @@ libvlc_media_player_get_media( libvlc_media_player_t *p_mi )
{ {
libvlc_media_t *p_m; libvlc_media_t *p_m;
lock(p_mi); lock( p_mi );
p_m = p_mi->p_md; p_m = p_mi->p_md;
if( p_m ) if( p_m )
libvlc_media_retain( p_mi->p_md ); libvlc_media_retain( p_m );
unlock(p_mi); unlock( p_mi );
return p_mi->p_md;
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