v4l2: remove source on errors

This commit is contained in:
Wim Taymans 2018-02-15 10:47:43 +01:00
parent 96fdfc86f7
commit 7ffaaf66a7

View file

@ -1187,7 +1187,9 @@ static void v4l2_on_fd_events(struct spa_source *source)
struct impl *this = source->data; struct impl *this = source->data;
if (source->rmask & SPA_IO_ERR) { if (source->rmask & SPA_IO_ERR) {
spa_log_warn(this->log, "v4l2 %p: error %d", this, source->rmask); 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);
return; return;
} }