output/Thread: add assertion on the ao_plugin_play() result
This commit is contained in:
parent
4a80e9cb25
commit
835136dcd3
@ -297,6 +297,7 @@ AudioOutput::PlayChunk()
|
|||||||
try {
|
try {
|
||||||
const ScopeUnlock unlock(mutex);
|
const ScopeUnlock unlock(mutex);
|
||||||
nbytes = ao_plugin_play(*this, data.data, data.size);
|
nbytes = ao_plugin_play(*this, data.data, data.size);
|
||||||
|
assert(nbytes <= data.size);
|
||||||
} catch (const std::runtime_error &e) {
|
} catch (const std::runtime_error &e) {
|
||||||
FormatError(e, "\"%s\" [%s] failed to play",
|
FormatError(e, "\"%s\" [%s] failed to play",
|
||||||
name, plugin.name);
|
name, plugin.name);
|
||||||
|
Loading…
Reference in New Issue
Block a user