summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/input/net_buf_ctrl.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 06e34ba27..e7655adb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
automatic software cropping is provided for drivers not supporting it.
* Fixed displaying of mpeg2 files where width/height is not a multiple of 16
(these files required cropping after decoding)
+ * Fix crashes with some input plugins when no audio output was available
xine-lib (1-rc6)
* Moved win32 frontend into separate module.
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;