aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/httpd_internal.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-08-06 22:18:01 +0200
committerMax Kellermann <max@duempel.org>2010-08-31 06:49:06 +0200
commita77506ae215df09ed02c30f39a3be663a3180d5b (patch)
tree3e3bc932f7d78721285a51b7c260576eb323ef91 /src/output/httpd_internal.h
parented5d297301ad07e1c8f59b25184b4148046c1ebe (diff)
downloadmpd-a77506ae215df09ed02c30f39a3be663a3180d5b.tar.gz
mpd-a77506ae215df09ed02c30f39a3be663a3180d5b.tar.xz
mpd-a77506ae215df09ed02c30f39a3be663a3180d5b.zip
output/httpd: forced flush after 32 kB of input data
Avoid buffer underruns on the streaming client, if the encoder is "too efficient" (e.g. when encoding silence while paused).
Diffstat (limited to 'src/output/httpd_internal.h')
-rw-r--r--src/output/httpd_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/output/httpd_internal.h b/src/output/httpd_internal.h
index 55843e73f..14a5cf350 100644
--- a/src/output/httpd_internal.h
+++ b/src/output/httpd_internal.h
@@ -52,6 +52,14 @@ struct httpd_output {
struct encoder *encoder;
/**
+ * Number of bytes which were fed into the encoder, without
+ * ever receiving new output. This is used to estimate
+ * whether MPD should manually flush the encoder, to avoid
+ * buffer underruns in the client.
+ */
+ size_t unflushed_input;
+
+ /**
* The MIME type produced by the #encoder.
*/
const char *content_type;