ipcpipeline: Simplify usage of g_cond_wait_until()

It will return FALSE if a timeout happened. So don't check if we
timed out afterwards, just use the return value.

CID #1416347
This commit is contained in:
Edward Hervey 2017-11-23 08:05:48 +01:00 committed by Edward Hervey
parent 00cfa72085
commit 39cd2bf8fe

View file

@ -102,8 +102,7 @@ comm_request_wait (GstIpcPipelineComm * comm, CommRequest * req,
req->id); req->id);
while (!req->replied) { while (!req->replied) {
if (ack_type == ACK_TYPE_TIMED) { if (ack_type == ACK_TYPE_TIMED) {
g_cond_wait_until (&req->cond, &comm->mutex, end_time); if (!g_cond_wait_until (&req->cond, &comm->mutex, end_time))
if (g_get_monotonic_time () >= end_time)
break; break;
} else } else
g_cond_wait (&req->cond, &comm->mutex); g_cond_wait (&req->cond, &comm->mutex);