mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
v4l2: Check device node
Check the device node on init. Only remove the source once
This commit is contained in:
parent
43e3ecdb3b
commit
91a10d7c9e
2 changed files with 9 additions and 3 deletions
|
|
@ -1194,8 +1194,9 @@ static void v4l2_on_fd_events(struct spa_source *source)
|
|||
|
||||
if (source->rmask & SPA_IO_ERR) {
|
||||
struct port *port = &this->out_ports[0];
|
||||
spa_log_error(this->log, "v4l2 %p: error %d", this, source->rmask);
|
||||
spa_loop_remove_source(port->data_loop, &port->source);
|
||||
spa_log_error(this->log, "v4l2 %p: error %08x", this, source->rmask);
|
||||
if (port->source.loop)
|
||||
spa_loop_remove_source(port->data_loop, &port->source);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1471,7 +1472,8 @@ static int do_remove_source(struct spa_loop *loop,
|
|||
void *user_data)
|
||||
{
|
||||
struct port *port = user_data;
|
||||
spa_loop_remove_source(port->data_loop, &port->source);
|
||||
if (port->source.loop)
|
||||
spa_loop_remove_source(port->data_loop, &port->source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue