mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pipewiresrc: use more accurate timeout
This commit is contained in:
parent
a6d221f18a
commit
6dcb19bbdf
1 changed files with 4 additions and 1 deletions
|
|
@ -917,7 +917,10 @@ gst_pipewire_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
|
|||
}
|
||||
timeout = FALSE;
|
||||
if (pwsrc->keepalive_time > 0) {
|
||||
if (pw_thread_loop_timed_wait (pwsrc->core->loop, (pwsrc->keepalive_time + 999) / 1000) == ETIMEDOUT)
|
||||
struct timespec abstime;
|
||||
pw_thread_loop_get_time(pwsrc->core->loop, &abstime,
|
||||
pwsrc->keepalive_time * SPA_NSEC_PER_MSEC);
|
||||
if (pw_thread_loop_timed_wait_full (pwsrc->core->loop, &abstime) == -ETIMEDOUT)
|
||||
timeout = TRUE;
|
||||
} else {
|
||||
pw_thread_loop_wait (pwsrc->core->loop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue