[vlc-devel] [PATCH 3/6] audiotrack: fix deadlock if JNIThread has an error
Thomas Guillem
thomas at gllm.fr
Wed Mar 11 15:00:47 CET 2015
---
modules/audio_output/audiotrack.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 922e8a2..d388d1a 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -1183,7 +1183,10 @@ JNIThread( void *data )
case CMD_TIME_GET:
assert( p_sys->p_audiotrack );
if( b_error )
+ {
+ p_cmd->out.time_get.i_ret = -1;
break;
+ }
p_cmd->out.time_get.i_ret =
JNIThread_TimeGet( env, p_aout,
&p_cmd->out.time_get.i_delay );
@@ -1202,6 +1205,8 @@ JNIThread( void *data )
}
if( p_sys->b_audiotrack_exception )
b_error = true;
+ if( b_error )
+ p_sys->i_samples_queued = 0;
if( b_remove_cmd )
{
--
2.1.3
More information about the vlc-devel
mailing list