[vlc-commits] audiotrack: use ExceptionCheck

Thomas Guillem git at videolan.org
Thu Nov 12 10:54:06 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Nov 12 10:32:57 2015 +0100| [fbfc6cec88b802a7da7c1897d31988198c296f0f] | committer: Thomas Guillem

audiotrack: use ExceptionCheck

Convenience function to check for pending exceptions without creating a local
reference to the exception object (that was not released).

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

 modules/audio_output/audiotrack.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index d6c9e5f..4c6fb71 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -263,7 +263,7 @@ InitJNIFields( audio_output_t *p_aout, JNIEnv* env )
         goto end;
 
 #define CHECK_EXCEPTION( what, critical ) do { \
-    if( (*env)->ExceptionOccurred( env ) ) \
+    if( (*env)->ExceptionCheck( env ) ) \
     { \
         msg_Err( p_aout, "%s failed", what ); \
         (*env)->ExceptionClear( env ); \
@@ -422,7 +422,7 @@ static inline bool
 check_exception( JNIEnv *env, audio_output_t *p_aout,
                  const char *method )
 {
-    if( (*env)->ExceptionOccurred( env ) )
+    if( (*env)->ExceptionCheck( env ) )
     {
         aout_sys_t *p_sys = p_aout->sys;
 
@@ -1298,7 +1298,7 @@ AudioTrack_PlayByteBuffer( JNIEnv *env, audio_output_t *p_aout,
                                             p_sys->circular.i_size );
         if( !p_sys->circular.u.bytebuffer.p_obj )
         {
-            if( (*env)->ExceptionOccurred( env ) )
+            if( (*env)->ExceptionCheck( env ) )
                 (*env)->ExceptionClear( env );
             return jfields.AudioTrack.ERROR;
         }



More information about the vlc-commits mailing list