mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-rtp: handle state change errors better
Make a new function to set the rtp stream in the error state. When we fail to start the stream, set the error state. Otherwise (like when we try to use an invalid interface name) the socket create will fail but the stream will still try to send data to the invalid socket.
This commit is contained in:
parent
6e7b893448
commit
4ffd74ef46
4 changed files with 14 additions and 3 deletions
|
|
@ -307,6 +307,7 @@ static void stream_state_changed(void *data, bool started, const char *error)
|
|||
impl->mcast_loop, impl->ttl, impl->dscp,
|
||||
impl->ifname)) < 0) {
|
||||
pw_log_error("can't make socket: %s", spa_strerror(res));
|
||||
rtp_stream_set_error(impl->stream, res, "Can't make socket");
|
||||
return;
|
||||
}
|
||||
impl->rtp_fd = res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue