MediaNode: Wait for 0 time if the absolute timeout is in the past
This commit is contained in:
parent
dfe056fd6a
commit
ae9cbf9c4e
@ -343,6 +343,10 @@ BMediaNode::WaitForMessage(bigtime_t waitUntil, uint32 flags,
|
|||||||
char data[B_MEDIA_MESSAGE_SIZE];
|
char data[B_MEDIA_MESSAGE_SIZE];
|
||||||
int32 message;
|
int32 message;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
|
|
||||||
|
if (waitUntil < TimeSource()->RealTime())
|
||||||
|
waitUntil = 0;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
size = read_port_etc(ControlPort(), &message, data,
|
size = read_port_etc(ControlPort(), &message, data,
|
||||||
sizeof(data), B_ABSOLUTE_TIMEOUT, waitUntil);
|
sizeof(data), B_ABSOLUTE_TIMEOUT, waitUntil);
|
||||||
|
Loading…
Reference in New Issue
Block a user