[vlc-commits] opensles: remove useless checks

Rafaël Carré git at videolan.org
Sun Jan 22 08:12:46 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Jan 22 01:18:20 2012 -0500| [b192dc3c38ac39d1dc0f5f2a55fd4f3abbcbbec0] | committer: Rafaël Carré

opensles: remove useless checks

those objects are guaranteed to exist

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b192dc3c38ac39d1dc0f5f2a55fd4f3abbcbbec0
---

 modules/audio_output/opensles_android.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index 906b6bb..6ee7cb2 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -113,19 +113,15 @@ static void Clear( aout_sys_t *p_sys )
 {
     // Destroy buffer queue audio player object
     // and invalidate all associated interfaces
-    if( p_sys->playerObject != NULL )
-        (*p_sys->playerObject)->Destroy( p_sys->playerObject );
+    (*p_sys->playerObject)->Destroy( p_sys->playerObject );
 
     // destroy output mix object, and invalidate all associated interfaces
-    if( p_sys->outputMixObject != NULL )
-        (*p_sys->outputMixObject)->Destroy( p_sys->outputMixObject );
+    (*p_sys->outputMixObject)->Destroy( p_sys->outputMixObject );
 
     // destroy engine object, and invalidate all associated interfaces
-    if( p_sys->engineObject != NULL )
-        (*p_sys->engineObject)->Destroy( p_sys->engineObject );
+    (*p_sys->engineObject)->Destroy( p_sys->engineObject );
 
-    if( p_sys->p_so_handle != NULL )
-        dlclose( p_sys->p_so_handle );
+    dlclose( p_sys->p_so_handle );
 
     free( p_sys );
 }
@@ -276,8 +272,7 @@ static void Close( vlc_object_t *p_this )
 
     (*p_sys->playerPlay)->SetPlayState( p_sys->playerPlay, SL_PLAYSTATE_STOPPED );
     //Flush remaining buffers if any.
-    if( p_sys->playerBufferQueue != NULL )
-        (*p_sys->playerBufferQueue)->Clear( p_sys->playerBufferQueue );
+    (*p_sys->playerBufferQueue)->Clear( p_sys->playerBufferQueue );
     Clear( p_sys );
 }
 



More information about the vlc-commits mailing list