diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-03-28 20:58:06 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-03-28 20:58:06 +0000 |
commit | 0eaaa39252f25597b8c495c1f312f31dd44931d4 (patch) | |
tree | 682689c987d7fb0270f61ec22d64da159d9947e3 /src | |
parent | b28e8690c42b0af4eec7fd26aff92b8eeb27fac5 (diff) | |
download | xine-lib-0eaaa39252f25597b8c495c1f312f31dd44931d4.tar.gz xine-lib-0eaaa39252f25597b8c495c1f312f31dd44931d4.tar.bz2 |
the anti-yoyo hack is still needed.
CVS patchset: 6315
CVS date: 2004/03/28 20:58:06
Diffstat (limited to 'src')
-rw-r--r-- | src/input/net_buf_ctrl.c | 23 |
1 files changed, 14 insertions, 9 deletions
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); |