mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
stream: clear the draining/drained state when inactive
When we inactivate the stream, clear the draining/drained state. Otherwise, the stream stays in the drained state and won't call the process function anymore when we activate it again. This used to work before because we called the process function from the Start command, which would queue a buffer and unset the drained flag. Calling the process function from Start was however not right when the process function needed to be called from the RT thread or when the stream is a driver. Fixes the issue where speaker-test would only play one channel.
This commit is contained in:
parent
994630cb3a
commit
4677cc348c
1 changed files with 3 additions and 0 deletions
|
|
@ -1969,6 +1969,9 @@ int pw_stream_set_active(struct pw_stream *stream, bool active)
|
||||||
pw_log_debug(NAME" %p: active:%d", stream, active);
|
pw_log_debug(NAME" %p: active:%d", stream, active);
|
||||||
if (impl->node)
|
if (impl->node)
|
||||||
pw_impl_node_set_active(impl->node, active);
|
pw_impl_node_set_active(impl->node, active);
|
||||||
|
|
||||||
|
if (!active)
|
||||||
|
impl->drained = impl->draining = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue