diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-08-27 17:53:32 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-08-27 17:53:32 +0000 |
commit | 7124674c22eadb8e21ad974f78046634e1914ba5 (patch) | |
tree | 1f42f7b0d8c4428fff1ece3378c437396ac273d3 | |
parent | cf071d85cb7edfbbd02eccd4a9af42e64daa3f2b (diff) | |
download | xine-lib-7124674c22eadb8e21ad974f78046634e1914ba5.tar.gz xine-lib-7124674c22eadb8e21ad974f78046634e1914ba5.tar.bz2 |
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
-rw-r--r-- | src/input/input_pvr.c | 9 |
1 files 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:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age> * - * $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 || |