summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-02-22 14:12:45 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-02-22 14:12:45 +0000
commit10169b6040ebabb2919b335ef4058d3394f9288a (patch)
tree4a994a512b0901af89d67ff7ce8028384169c89c
parentcd4a41b97921778103891b206ca99f0240e8e059 (diff)
downloadxine-lib-10169b6040ebabb2919b335ef4058d3394f9288a.tar.gz
xine-lib-10169b6040ebabb2919b335ef4058d3394f9288a.tar.bz2
fix another situation of not showing still frames: when the video fifo is full,
we won't have any free buffers, so the try_alloc() will fail and the flush is not issued in video_out -> always keep one spare buffer CVS patchset: 4247 CVS date: 2003/02/22 14:12:45
-rw-r--r--src/xine-engine/buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c
index 5c7de503f..7524196bc 100644
--- a/src/xine-engine/buffer.c
+++ b/src/xine-engine/buffer.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.c,v 1.23 2003/02/08 13:52:44 tmattern Exp $
+ * $Id: buffer.c,v 1.24 2003/02/22 14:12:45 mroi Exp $
*
*
* contents:
@@ -89,7 +89,9 @@ static buf_element_t *buffer_pool_alloc (fifo_buffer_t *this) {
pthread_mutex_lock (&this->buffer_pool_mutex);
- while (!this->buffer_pool_top) {
+ /* we always keep one free buffer for emergency situations like
+ * decoder flushes that would need a buffer in buffer_pool_try_alloc() */
+ while (this->buffer_pool_num_free < 2) {
pthread_cond_wait (&this->buffer_pool_cond_not_empty, &this->buffer_pool_mutex);
}