[vlc-devel] commit: No need to check for a NULL as libvlc_media_release is checking. ( Rémi Duraffort )
git version control
git at videolan.org
Wed May 20 20:57:19 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed May 20 20:55:55 2009 +0200| [a4bcd514cc7ff4079d0e82ab32cacd3a9744b363] | committer: Rémi Duraffort
No need to check for a NULL as libvlc_media_release is checking.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4bcd514cc7ff4079d0e82ab32cacd3a9744b363
---
src/control/media_list.c | 6 ++----
src/control/media_player.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/control/media_list.c b/src/control/media_list.c
index e043c4c..75389c6 100644
--- a/src/control/media_list.c
+++ b/src/control/media_list.c
@@ -201,8 +201,7 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
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++ )
{
@@ -279,8 +278,7 @@ void libvlc_media_list_set_media( libvlc_media_list_t * p_mlist,
{
VLC_UNUSED(p_e);
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 );
p_mlist->p_md = p_md;
vlc_mutex_unlock( &p_mlist->object_lock );
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 126eef9..48b4b76 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -391,8 +391,7 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
release_input_thread( p_mi, true );
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 );
free( p_mi );
}
More information about the vlc-devel
mailing list