vlc | branch: master | Thomas Guillem <[email protected]> | Wed Mar 11 15:51:05 
2015 +0100| [64e8b317ce9bf738b0d404a4ca967511e8a1e030] | committer: 
Jean-Baptiste Kempf

audiotrack: re-init offset after a flush too

fix crash after a flush

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 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;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to