[vlc-commits] audiotrack: re-init offset after a flush too

Thomas Guillem git at videolan.org
Wed Mar 11 16:09:53 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | 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 <jb at videolan.org>

> 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;



More information about the vlc-commits mailing list