diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2004-09-23 16:41:39 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2004-09-23 16:41:39 +0000 |
commit | 8a3a0d625e926b421eae814f9a7d6ce524892e8b (patch) | |
tree | cd170223a7396ddf508fc2c3a87c5de6481623fc | |
parent | f644063d6fbb41996b76156464a3017ce991c984 (diff) | |
download | xine-lib-8a3a0d625e926b421eae814f9a7d6ce524892e8b.tar.gz xine-lib-8a3a0d625e926b421eae814f9a7d6ce524892e8b.tar.bz2 |
- Factor is 1.0, num_buffers is 230...
Fix video as well
CVS patchset: 6997
CVS date: 2004/09/23 16:41:39
-rw-r--r-- | src/input/net_buf_ctrl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 489764384..5869bb21d 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -508,13 +508,17 @@ nbc_t *nbc_init (xine_stream_t *stream) { /* when the FIFO sizes are increased compared to the default configuration, * apply a factor to the high water mark */ entry = stream->xine->config->lookup_entry(stream->xine->config, "video.num_buffers"); - video_fifo_factor = (double)video_fifo->buffer_pool_capacity / (double)entry->num_default; + /* No entry when no video output */ + if (entry) + video_fifo_factor = (double)video_fifo->buffer_pool_capacity / (double)entry->num_default; + else + video_fifo_factor = 1.0; entry = stream->xine->config->lookup_entry(stream->xine->config, "audio.num_buffers"); /* When there's no audio output, there's no entry */ if (entry) audio_fifo_factor = (double)audio_fifo->buffer_pool_capacity / (double)entry->num_default; else - audio_fifo_factor = 230; + audio_fifo_factor = 1.0; /* use the smaller factor */ if (video_fifo_factor < audio_fifo_factor) this->high_water_mark = (double)DEFAULT_HIGH_WATER_MARK * video_fifo_factor; |