Commit a4bcd514 authored by Rémi Duraffort's avatar Rémi Duraffort

No need to check for a NULL as libvlc_media_release is checking.

parent 02e878a1
...@@ -201,7 +201,6 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) ...@@ -201,7 +201,6 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
libvlc_event_manager_release( p_mlist->p_event_manager ); libvlc_event_manager_release( p_mlist->p_event_manager );
if( p_mlist->p_md )
libvlc_media_release( p_mlist->p_md ); libvlc_media_release( p_mlist->p_md );
for ( i = 0; i < vlc_array_count( &p_mlist->items ); i++ ) for ( i = 0; i < vlc_array_count( &p_mlist->items ); i++ )
...@@ -279,7 +278,6 @@ void libvlc_media_list_set_media( libvlc_media_list_t * p_mlist, ...@@ -279,7 +278,6 @@ void libvlc_media_list_set_media( libvlc_media_list_t * p_mlist,
{ {
VLC_UNUSED(p_e); VLC_UNUSED(p_e);
vlc_mutex_lock( &p_mlist->object_lock ); vlc_mutex_lock( &p_mlist->object_lock );
if( p_mlist->p_md )
libvlc_media_release( p_mlist->p_md ); libvlc_media_release( p_mlist->p_md );
libvlc_media_retain( p_md ); libvlc_media_retain( p_md );
p_mlist->p_md = p_md; p_mlist->p_md = p_md;
......
...@@ -391,7 +391,6 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi ) ...@@ -391,7 +391,6 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
release_input_thread( p_mi, true ); release_input_thread( p_mi, true );
libvlc_event_manager_release( p_mi->p_event_manager ); libvlc_event_manager_release( p_mi->p_event_manager );
if( p_mi->p_md )
libvlc_media_release( p_mi->p_md ); libvlc_media_release( p_mi->p_md );
vlc_mutex_destroy( &p_mi->object_lock ); vlc_mutex_destroy( &p_mi->object_lock );
free( p_mi ); free( p_mi );
......
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