summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-11-14 12:00:14 +0100
committerMax Kellermann <max@musicpd.org>2017-11-14 12:00:14 +0100
commit014f8cd693a1a5b5c3b0ebeeb6b799701a5132f1 (patch)
tree2f714cb9441f77149145a52e45f73ca89da64697 /src
parentaea37e46e3e26183dd94479ec941bfb14acd89e6 (diff)
output/httpd: flush encoder after tag
Without the flush, ReadPage() may not return any data, or not all data. This may result in incomplete ddata the new "header" page, corrupting streams with some encoders such as Vorbis. Fixes #145
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/httpd/HttpdOutputPlugin.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/output/plugins/httpd/HttpdOutputPlugin.cxx b/src/output/plugins/httpd/HttpdOutputPlugin.cxx
index 966669b1e..0a811b706 100644
--- a/src/output/plugins/httpd/HttpdOutputPlugin.cxx
+++ b/src/output/plugins/httpd/HttpdOutputPlugin.cxx
@@ -468,6 +468,7 @@ HttpdOutput::SendTag(const Tag &tag)
try {
encoder->SendTag(tag);
+ encoder->Flush();
} catch (const std::runtime_error &) {
/* ignore */
}