[vlc-devel] [PATCH 1/4] input: don't override time and position when thread starts
Thomas Guillem
thomas at gllm.fr
Thu Jun 9 18:16:48 CEST 2016
input_SendEventPosition() could override the time or the position if it was set
just before the input thread was started.
---
src/input/input.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 6a2a8a8..39f9867 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -926,6 +926,8 @@ static void StartTitle( input_thread_t * p_input )
s.i_int = p_input->p->i_start;
input_ControlPush( p_input, INPUT_CONTROL_SET_TIME, &s );
}
+ else
+ input_SendEventPosition( p_input, 0.0, 0 );
if( p_input->p->i_stop > 0 && p_input->p->i_stop <= p_input->p->i_start )
{
msg_Warn( p_input, "invalid stop-time ignored" );
@@ -1308,8 +1310,6 @@ static int Init( input_thread_t * p_input )
i_length = input_item_GetDuration( p_input->p->p_item );
input_SendEventLength( p_input, i_length );
- input_SendEventPosition( p_input, 0.0, 0 );
-
if( !p_input->b_preparsing )
{
StartTitle( p_input );
@@ -1324,6 +1324,8 @@ static int Init( input_thread_t * p_input )
input_ControlPush( p_input, INPUT_CONTROL_SET_RATE, &val );
}
}
+ else
+ input_SendEventPosition( p_input, 0.0, 0 );
if( !p_input->b_preparsing && p_input->p->p_sout )
{
--
2.8.1
More information about the vlc-devel
mailing list