output/PipeWire: skip Cancel() if already drained

This commit is contained in:
Max Kellermann 2022-07-09 00:53:52 +02:00
parent 6b430ba271
commit 493677ff81
1 changed files with 3 additions and 0 deletions

View File

@ -892,6 +892,9 @@ PipeWireOutput::Cancel() noexcept
const PipeWire::ThreadLoopLock lock(thread_loop);
interrupted = false;
if (drained)
return;
ring_buffer->reset();
}