summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@users.sourceforge.net>2004-09-23 15:19:47 +0000
committerBastien Nocera <hadess@users.sourceforge.net>2004-09-23 15:19:47 +0000
commit9d14da63dfd03d633c04b6ba52ebbb0aaa11004b (patch)
treed6b27ba95531878dde1ffd40333cfc51a789a56a /src
parent983e4dd1dbd74b3aea742f5eb702275c8715f541 (diff)
downloadxine-lib-9d14da63dfd03d633c04b6ba52ebbb0aaa11004b.tar.gz
xine-lib-9d14da63dfd03d633c04b6ba52ebbb0aaa11004b.tar.bz2
- Fix crashes with some input plugins when no audio output was available
That's either that, or always registering audio.num_buffers in src/xine-engine/audio_decoder.c CVS patchset: 6994 CVS date: 2004/09/23 15:19:47
Diffstat (limited to 'src')
-rw-r--r--src/input/net_buf_ctrl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index d0157d5b8..489764384 100644
--- a/src/input/net_buf_ctrl.c
+++ b/src/input/net_buf_ctrl.c
@@ -510,7 +510,11 @@ nbc_t *nbc_init (xine_stream_t *stream) {
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;
entry = stream->xine->config->lookup_entry(stream->xine->config, "audio.num_buffers");
- audio_fifo_factor = (double)audio_fifo->buffer_pool_capacity / (double)entry->num_default;
+ /* 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;
/* use the smaller factor */
if (video_fifo_factor < audio_fifo_factor)
this->high_water_mark = (double)DEFAULT_HIGH_WATER_MARK * video_fifo_factor;