mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
Use SPA_IO_BUFFERS_INIT when we can
We should not have to initialize the state to NEED_DATA, anything that is not HAVE_DATA is good. Also we need to set the buffer to INVALID because else it might be recycled.
This commit is contained in:
parent
07f935a5ed
commit
acccccd2c0
6 changed files with 7 additions and 13 deletions
|
|
@ -169,7 +169,7 @@ static int link_io(struct impl *this)
|
|||
res, spa_strerror(res));
|
||||
}
|
||||
|
||||
spa_zero(this->io_buffers);
|
||||
this->io_buffers = SPA_IO_BUFFERS_INIT;
|
||||
|
||||
if ((res = spa_node_port_set_io(this->follower,
|
||||
this->direction, 0,
|
||||
|
|
|
|||
|
|
@ -143,8 +143,7 @@ static int make_link(struct impl *this,
|
|||
l->in_port = in_port;
|
||||
l->in_flags = 0;
|
||||
l->negotiated = false;
|
||||
l->io.status = SPA_STATUS_NEED_DATA;
|
||||
l->io.buffer_id = SPA_ID_INVALID;
|
||||
l->io = SPA_IO_BUFFERS_INIT;
|
||||
l->n_buffers = 0;
|
||||
l->min_buffers = min_buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ static int link_io(struct impl *this)
|
|||
res, spa_strerror(res));
|
||||
}
|
||||
|
||||
spa_zero(this->io_buffers);
|
||||
this->io_buffers = SPA_IO_BUFFERS_INIT;
|
||||
|
||||
if ((res = spa_node_port_set_io(this->follower,
|
||||
this->direction, 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue