Commit 3bf78587 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

audiotrack: fix deadlock if JNIThread has an error

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f6c3b064
...@@ -1183,7 +1183,10 @@ JNIThread( void *data ) ...@@ -1183,7 +1183,10 @@ JNIThread( void *data )
case CMD_TIME_GET: case CMD_TIME_GET:
assert( p_sys->p_audiotrack ); assert( p_sys->p_audiotrack );
if( b_error ) if( b_error )
{
p_cmd->out.time_get.i_ret = -1;
break; break;
}
p_cmd->out.time_get.i_ret = p_cmd->out.time_get.i_ret =
JNIThread_TimeGet( env, p_aout, JNIThread_TimeGet( env, p_aout,
&p_cmd->out.time_get.i_delay ); &p_cmd->out.time_get.i_delay );
...@@ -1202,6 +1205,8 @@ JNIThread( void *data ) ...@@ -1202,6 +1205,8 @@ JNIThread( void *data )
} }
if( p_sys->b_audiotrack_exception ) if( p_sys->b_audiotrack_exception )
b_error = true; b_error = true;
if( b_error )
p_sys->i_samples_queued = 0;
if( b_remove_cmd ) if( b_remove_cmd )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment