[vlc-devel] [PATCH 1/3] audiotrack: re-init offset after a flush too

Thomas Guillem thomas at gllm.fr
Wed Mar 11 15:51:05 CET 2015


fix crash after a flush
---
 modules/audio_output/audiotrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 939ed05..1efe271 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1337,6 +1337,7 @@ JNIThread( void *data )
                 if( p_buffer == NULL )
                 {
                     p_buffer = p_cmd->in.play.p_buffer;
+                    i_buffer_offset = 0;
                     b_error = JNIThread_PreparePlay( env, p_aout, p_buffer )
                               != VLC_SUCCESS;
                 }
@@ -1354,7 +1355,6 @@ JNIThread( void *data )
                 else
                 {
                     p_buffer = NULL;
-                    i_buffer_offset = 0;
                 }
                 if( i_play_wait > 0 )
                     i_play_deadline = mdate() + i_play_wait;
-- 
2.1.3




More information about the vlc-devel mailing list