Commit 302972e9 authored by Max Kellermann's avatar Max Kellermann

output/httpd: fix throttling bug after resuming playback

Reset the timer when paused and no client is connected. This fixes Mantis ticket 0003527.
parent 31b380b2
......@@ -3,6 +3,7 @@ ver 0.17.2 (2012/??/??)
- fix crash in local file check
* output:
- httpd: use monotonic clock, avoid hiccups after system clock adjustment
- httpd: fix throttling bug after resuming playback
* mapper: fix non-UTF8 music directory name
......
......@@ -422,6 +422,14 @@ httpd_output_delay(struct audio_output *ao)
{
struct httpd_output *httpd = (struct httpd_output *)ao;
if (!httpd_output_lock_has_clients(httpd) && httpd->base.pause) {
/* if there's no client and this output is paused,
then httpd_output_pause() will not do anything, it
will not fill the buffer and it will not update the
timer; therefore, we reset the timer here */
timer_reset(httpd->timer);
}
return httpd->timer->started
? timer_delay(httpd->timer)
: 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment