From 8a3a0d625e926b421eae814f9a7d6ce524892e8b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 23 Sep 2004 16:41:39 +0000 Subject: - Factor is 1.0, num_buffers is 230... Fix video as well CVS patchset: 6997 CVS date: 2004/09/23 16:41:39 --- src/input/net_buf_ctrl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3