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

libvlc_media_player_get_media: missing lock

parent 2a012ee3
...@@ -494,12 +494,14 @@ libvlc_media_player_get_media( ...@@ -494,12 +494,14 @@ libvlc_media_player_get_media(
libvlc_media_player_t *p_mi, libvlc_media_player_t *p_mi,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
libvlc_media_t *p_m;
VLC_UNUSED(p_e); VLC_UNUSED(p_e);
if( !p_mi->p_md ) vlc_mutex_lock( &p_mi->object_lock );
return NULL; p_m = p_mi->p_md;
if( p_m )
libvlc_media_retain( p_mi->p_md ); libvlc_media_retain( p_mi->p_md );
vlc_mutex_unlock( &p_mi->object_lock );
return p_mi->p_md; return p_mi->p_md;
} }
......
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