Commit 79839db3 authored by Max Kellermann's avatar Max Kellermann

output/oss: return early if PcmExport::Export() returns empty array

This can happen if the DoP converter doesn't get enough source samples for one destination quad. This isn't a critical bug, because the OSS plugin doesn't support DoP yet, but it's good to be prepared.
parent d478bdda
......@@ -670,12 +670,13 @@ OssOutput::Play(const void *chunk, size_t size)
#ifdef AFMT_S24_PACKED
const auto e = pcm_export->Export({chunk, size});
if (e.empty())
return size;
chunk = e.data;
size = e.size;
#endif
assert(size > 0);
while (true) {
ret = fd.Write(chunk, size);
if (ret > 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