mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
impl-node: increment async driver nodes required field
A driver can't be async, we always need to be able to trigger it to start it so increment the required field. Fixes an issue with asunc drivers such as the video-src example or gnome screen sharing.
This commit is contained in:
parent
7732d0e3e5
commit
1e5d9cc635
|
@ -112,7 +112,7 @@ static inline void activate_target(struct pw_impl_node *node, struct pw_node_tar
|
|||
{
|
||||
struct pw_node_activation_state *state = &t->activation->state[0];
|
||||
if (!t->active) {
|
||||
if (!node->async && !node->exported) {
|
||||
if ((!node->async || node->driving) && !node->exported) {
|
||||
SPA_ATOMIC_INC(state->required);
|
||||
SPA_ATOMIC_INC(state->pending);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ static inline void deactivate_target(struct pw_impl_node *node, struct pw_node_t
|
|||
{
|
||||
if (t->active) {
|
||||
struct pw_node_activation_state *state = &t->activation->state[0];
|
||||
if (!node->async) {
|
||||
if (!node->async || node->driving) {
|
||||
/* the driver copies the required to the pending state
|
||||
* so first try to resume the node and then decrement the
|
||||
* required state. This way we either resume with the old value
|
||||
|
|
Loading…
Reference in a new issue