mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
stream: set errno to the current error
Make the state_changed event and _get_state() function set errno with the current error value if the state is in error, so that application can use this to give more detailed error reporting. Use this in alsa, v4l2 and pulse to give some other error codes than EIO. Fixes #4574
This commit is contained in:
parent
491fb26f18
commit
3905e3b3d3
7 changed files with 27 additions and 7 deletions
|
|
@ -391,7 +391,7 @@ static void on_stream_state_changed(void *data, enum pw_stream_state old, enum p
|
|||
|
||||
if (state == PW_STREAM_STATE_ERROR) {
|
||||
pw_log_warn("%s", error);
|
||||
pw->error = -EIO;
|
||||
pw->error = -errno;
|
||||
update_active(&pw->io);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue