[vlc-commits] audiotrack: reset and play after a DEAD_OBJECT error

Thomas Guillem git at videolan.org
Wed Jul 8 11:08:12 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  8 11:01:49 2015 +0200| [8d6d383af94859bf4f96a15923986e6e2ce7fffa] | committer: Thomas Guillem

audiotrack: reset and play after a DEAD_OBJECT error

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

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

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 7ae3d60..f0ff23d 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1314,7 +1314,12 @@ AudioTrack_Play( JNIEnv *env, audio_output_t *p_aout,
         {
             msg_Warn( p_aout, "ERROR_DEAD_OBJECT: "
                               "try recreating AudioTrack" );
-            i_ret = AudioTrack_Recreate( env, p_aout );
+            if( ( i_ret = AudioTrack_Recreate( env, p_aout ) ) == 0 )
+            {
+                AudioTrack_Reset( env, p_aout );
+                JNI_AT_CALL_VOID( play );
+                CHECK_AT_EXCEPTION( "play" );
+            }
         } else
         {
             const char *str;



More information about the vlc-commits mailing list