diff options
author | Max Kellermann <max@duempel.org> | 2011-09-16 21:49:59 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-16 21:50:05 +0200 |
commit | 2be245b75e75906fb202e9d6ec08c49b99a0fa24 (patch) | |
tree | 0da5bc866db2020fa8081cead97da9de5ffe0de3 /src/input/soup_input_plugin.c | |
parent | 17927f5c26f0ba5f7f1ecc40b8d0a92700603e89 (diff) | |
download | mpd-2be245b75e75906fb202e9d6ec08c49b99a0fa24.tar.gz mpd-2be245b75e75906fb202e9d6ec08c49b99a0fa24.tar.xz mpd-2be245b75e75906fb202e9d6ec08c49b99a0fa24.zip |
input/soup: wait some more before resuming the stream
Diffstat (limited to 'src/input/soup_input_plugin.c')
-rw-r--r-- | src/input/soup_input_plugin.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c index 0f7d4ea18..52dcec427 100644 --- a/src/input/soup_input_plugin.c +++ b/src/input/soup_input_plugin.c @@ -40,6 +40,11 @@ */ static const size_t SOUP_MAX_BUFFERED = 512 * 1024; +/** + * Resume the stream at this number of bytes after it has been paused. + */ +static const size_t SOUP_RESUME_AT = 384 * 1024; + static SoupURI *soup_proxy; static SoupSession *soup_session; @@ -422,7 +427,7 @@ input_soup_read(struct input_stream *is, void *ptr, size_t size, } } - if (s->pause && s->total_buffered < SOUP_MAX_BUFFERED) { + if (s->pause && s->total_buffered < SOUP_RESUME_AT) { s->pause = false; soup_session_unpause_message(soup_session, s->msg); } |