From 7124674c22eadb8e21ad974f78046634e1914ba5 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 27 Aug 2004 17:53:32 +0000 Subject: fix deadlock. (i'm ashamed of this pvr plugin, it needs a rewrite badly) CVS patchset: 6907 CVS date: 2004/08/27 17:53:32 --- src/input/input_pvr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 79e979f7d..3eed852b6 100644 --- a/src/input/input_pvr.c +++ b/src/input/input_pvr.c @@ -38,7 +38,7 @@ * usage: * xine pvr:/\!\! * - * $Id: input_pvr.c,v 1.49 2004/08/02 12:51:09 miguelfreitas Exp $ + * $Id: input_pvr.c,v 1.50 2004/08/27 17:53:32 miguelfreitas Exp $ */ /************************************************************************** @@ -705,8 +705,13 @@ static int pvr_play_file(pvr_input_plugin_t *this, fifo_buffer_t *fifo, uint8_t if(speed != XINE_SPEED_PAUSE) { /* cannot run faster than the writing thread */ - while( this->play_blk+1 >= this->rec_blk ) + while( this->play_blk+1 >= this->rec_blk ) { + if( this->valid_data ) { + this->valid_data = 0; + pthread_cond_signal (&this->wake_pvr); + } pthread_cond_wait (&this->has_valid_data, &this->lock); + } } if( this->play_fd == -1 || -- cgit v1.2.3