mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
stream: fix timeout
This commit is contained in:
parent
3f8123143d
commit
9a0ada2a3f
1 changed files with 4 additions and 2 deletions
|
|
@ -542,7 +542,7 @@ static void
|
||||||
handle_socket (PinosStream *stream, int rtfd)
|
handle_socket (PinosStream *stream, int rtfd)
|
||||||
{
|
{
|
||||||
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
|
PinosStreamImpl *impl = SPA_CONTAINER_OF (stream, PinosStreamImpl, this);
|
||||||
struct timespec interval;
|
struct timespec interval, start;
|
||||||
|
|
||||||
impl->rtfd = rtfd;
|
impl->rtfd = rtfd;
|
||||||
impl->rtsocket_source = pinos_loop_add_io (stream->context->loop,
|
impl->rtsocket_source = pinos_loop_add_io (stream->context->loop,
|
||||||
|
|
@ -555,11 +555,13 @@ handle_socket (PinosStream *stream, int rtfd)
|
||||||
impl->timeout_source = pinos_loop_add_timer (stream->context->loop,
|
impl->timeout_source = pinos_loop_add_timer (stream->context->loop,
|
||||||
on_timeout,
|
on_timeout,
|
||||||
stream);
|
stream);
|
||||||
|
start.tv_sec = 0;
|
||||||
|
start.tv_nsec = 100000000;
|
||||||
interval.tv_sec = 0;
|
interval.tv_sec = 0;
|
||||||
interval.tv_nsec = 100000000;
|
interval.tv_nsec = 100000000;
|
||||||
pinos_loop_update_timer (stream->context->loop,
|
pinos_loop_update_timer (stream->context->loop,
|
||||||
impl->timeout_source,
|
impl->timeout_source,
|
||||||
NULL,
|
&start,
|
||||||
&interval,
|
&interval,
|
||||||
false);
|
false);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue