Commit fbfc6cec authored by Thomas Guillem's avatar 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).
parent 0c482772
......@@ -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;
}
......
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