From 5deaed2b06633fe7c179708919e1e65d9a6f72ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Borel?= Date: Fri, 17 May 2002 18:06:34 +0000 Subject: [PATCH] *Don't keep the control lock during the pause --- src/input/input_clock.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/input/input_clock.c b/src/input/input_clock.c index 3479311c4d..63e82faea8 100644 --- a/src/input/input_clock.c +++ b/src/input/input_clock.c @@ -2,7 +2,7 @@ * input_clock.c: Clock/System date convertions, stream management ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_clock.c,v 1.30 2002/05/14 21:23:44 massiot Exp $ + * $Id: input_clock.c,v 1.31 2002/05/17 18:06:34 stef Exp $ * * Authors: Christophe Massiot * @@ -155,10 +155,12 @@ int input_ClockManageControl( input_thread_t * p_input, if( p_input->stream.i_new_status == PAUSE_S ) { int i_old_status; + vlc_mutex_lock( &p_input->stream.control.control_lock ); i_old_status = p_input->stream.control.i_status; - p_input->stream.control.i_status = PAUSE_S; + vlc_mutex_unlock( &p_input->stream.control.control_lock ); + vlc_cond_wait( &p_input->stream.stream_wait, &p_input->stream.stream_lock ); p_pgrm->last_syscr = 0; @@ -167,13 +169,15 @@ int input_ClockManageControl( input_thread_t * p_input, if( p_input->stream.i_new_status == PAUSE_S ) { /* PAUSE_S undoes the pause state: Return to old state. */ + vlc_mutex_lock( &p_input->stream.control.control_lock ); p_input->stream.control.i_status = i_old_status; + vlc_mutex_unlock( &p_input->stream.control.control_lock ); + p_input->stream.i_new_status = UNDEF_S; p_input->stream.i_new_rate = UNDEF_S; } /* We handle i_new_status != PAUSE_S below... */ - vlc_mutex_unlock( &p_input->stream.control.control_lock ); i_return_value = PAUSE_S; } -- 2.39.5