summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-02-10 22:24:36 +0100
committerMax Kellermann <max@musicpd.org>2017-02-10 22:24:36 +0100
commit835136dcd36b8ae6b732e945a929f8b39f3476bc (patch)
tree1667485b087ffc16277d878a7c9c081d2ce22263
parent4a80e9cb2580a8be155a75117a6f52b8d267cdf6 (diff)
output/Thread: add assertion on the ao_plugin_play() result
-rw-r--r--src/output/OutputThread.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx
index 71e7c5409..0f10b47f0 100644
--- a/src/output/OutputThread.cxx
+++ b/src/output/OutputThread.cxx
@@ -297,6 +297,7 @@ AudioOutput::PlayChunk()
try {
const ScopeUnlock unlock(mutex);
nbytes = ao_plugin_play(*this, data.data, data.size);
+ assert(nbytes <= data.size);
} catch (const std::runtime_error &e) {
FormatError(e, "\"%s\" [%s] failed to play",
name, plugin.name);