summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index a0e6f66..b352067 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -1215,11 +1215,23 @@ void buffering_thread(void)
case Q_SET_WATERMARK:
LOGFQUEUE("buffering < Q_SET_WATERMARK");
conf_watermark = (size_t)ev.data;
+ if (conf_watermark < conf_filechunk)
+ {
+ logf("wmark<chunk %ld<%ld", conf_watermark, conf_filechunk);
+ conf_watermark = conf_filechunk;
+ }
break;
case Q_SET_CHUNKSIZE:
LOGFQUEUE("buffering < Q_SET_CHUNKSIZE");
conf_filechunk = (size_t)ev.data;
+ if (conf_filechunk == 0)
+ conf_filechunk = BUFFERING_DEFAULT_FILECHUNK;
+ if (conf_filechunk > conf_watermark)
+ {
+ logf("chunk>wmark %ld>%ld", conf_filechunk, conf_watermark);
+ conf_watermark = conf_filechunk;
+ }
break;
case Q_SET_PRESEEK: