diff --git a/spa/plugins/v4l2/v4l2-source.c b/spa/plugins/v4l2/v4l2-source.c index 0e249ffcd..4f429e00d 100644 --- a/spa/plugins/v4l2/v4l2-source.c +++ b/spa/plugins/v4l2/v4l2-source.c @@ -307,6 +307,7 @@ static int impl_node_send_command(void *object, const struct spa_command *comman break; } case SPA_NODE_COMMAND_Pause: + case SPA_NODE_COMMAND_Suspend: if ((res = spa_v4l2_stream_off(this)) < 0) return res; break; diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index 9539e7bd9..f0f627598 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -1534,12 +1534,12 @@ static int spa_v4l2_stream_off(struct impl *this) enum v4l2_buf_type type; uint32_t i; - if (dev->fd == -1) - return -EIO; - if (!dev->active) return 0; + if (dev->fd == -1) + return -EIO; + spa_log_debug(this->log, "stopping"); spa_loop_invoke(this->data_loop, do_remove_source, 0, NULL, 0, true, port);