From 975e5194a8494a8f9379fb15e912db56fa0743de Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Thu, 16 Oct 2003 22:15:09 +0000 Subject: Avoid yoyo effect with poorly interleaved streams. CVS patchset: 5532 CVS date: 2003/10/16 22:15:09 --- src/input/net_buf_ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index ed14b323f..6fb1c557e 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -40,6 +40,8 @@ #define DEFAULT_LOW_WATER_MARK 1 #define DEFAULT_HIGH_WATER_MARK 5000 /* in 1/1000 s */ +#define FULL_FIFO_MARK 5 /* buffers free */ + #define WRAP_THRESHOLD 5*90000 /* from the asf demuxer */ #define FIFO_PUT 0 @@ -403,7 +405,7 @@ static void nbc_get_cb (fifo_buffer_t *fifo, /* Don't pause if the other fifo is full because the next put() will restart the engine */ - if (other_fifo_free > 2) { + if (other_fifo_free > FULL_FIFO_MARK) { this->buffering = 1; this->progress = 0; report_progress (this->stream, 0); -- cgit v1.2.3