DecoderControl: reduce the number of PlayerThread wakeups
Wake up the PlayerThread only if it is really waiting for the decoder. This greatly reduces the number of system calls in the DecoderThread.
This commit is contained in:
@@ -102,6 +102,7 @@ decoder_flush_chunk(Decoder &decoder)
|
||||
decoder.chunk = nullptr;
|
||||
|
||||
dc.Lock();
|
||||
dc.client_cond.signal();
|
||||
if (dc.client_is_waiting)
|
||||
dc.client_cond.signal();
|
||||
dc.Unlock();
|
||||
}
|
||||
|
Reference in New Issue
Block a user