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.
This commit is contained in:
parent
d478bdda8e
commit
79839db3a3
@ -670,12 +670,13 @@ OssOutput::Play(const void *chunk, size_t size)
|
|||||||
|
|
||||||
#ifdef AFMT_S24_PACKED
|
#ifdef AFMT_S24_PACKED
|
||||||
const auto e = pcm_export->Export({chunk, size});
|
const auto e = pcm_export->Export({chunk, size});
|
||||||
|
if (e.empty())
|
||||||
|
return size;
|
||||||
|
|
||||||
chunk = e.data;
|
chunk = e.data;
|
||||||
size = e.size;
|
size = e.size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(size > 0);
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ret = fd.Write(chunk, size);
|
ret = fd.Write(chunk, size);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user