From 0eaaa39252f25597b8c495c1f312f31dd44931d4 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sun, 28 Mar 2004 20:58:06 +0000 Subject: the anti-yoyo hack is still needed. CVS patchset: 6315 CVS date: 2004/03/28 20:58:06 --- src/input/net_buf_ctrl.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 0323e31b7..72f89c309 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -445,15 +445,20 @@ static void nbc_get_cb (fifo_buffer_t *fifo, int has_audio = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO); if (((this->video_fifo_length == 0) && has_video) || ((this->audio_fifo_length == 0) && has_audio)) { - - this->buffering = 1; - this->progress = 0; - report_progress (this->stream, 0); - - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "\nnet_buf_ctrl: nbc_get_cb: starts buffering, vid: %d, aud: %d\n", - this->video_fifo_fill, this->audio_fifo_fill); - nbc_set_speed_pause(this); + int other_fifo_free; + + /* do not pause if a fifo is full to avoid yoyo (play-pause-play-pause) */ + if ((this->video_fifo_free > FULL_FIFO_MARK) && + (this->audio_fifo_free > FULL_FIFO_MARK)) { + this->buffering = 1; + this->progress = 0; + report_progress (this->stream, 0); + + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "\nnet_buf_ctrl: nbc_get_cb: starts buffering, vid: %d, aud: %d\n", + this->video_fifo_fill, this->audio_fifo_fill); + nbc_set_speed_pause(this); + } } } else { nbc_set_speed_pause(this); -- cgit v1.2.3