mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-combine-stream: flush data in paused state
When stream is paused, internal delay buffers were cleared, but some
data could stay in stream output queue. Without a flush, these data where
played in front of a new data.
Patch was inspired by 64d6ff4184 fixing the
same issue in a filter-chain module.
Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
parent
ff3bc8818f
commit
c2e539b780
1 changed files with 5 additions and 0 deletions
|
|
@ -1073,6 +1073,7 @@ static void combine_state_changed(void *d, enum pw_stream_state old,
|
|||
enum pw_stream_state state, const char *error)
|
||||
{
|
||||
struct impl *impl = d;
|
||||
struct stream *s;
|
||||
switch (state) {
|
||||
case PW_STREAM_STATE_ERROR:
|
||||
case PW_STREAM_STATE_UNCONNECTED:
|
||||
|
|
@ -1080,6 +1081,10 @@ static void combine_state_changed(void *d, enum pw_stream_state old,
|
|||
break;
|
||||
case PW_STREAM_STATE_PAUSED:
|
||||
clear_delaybuf(impl);
|
||||
spa_list_for_each(s, &impl->streams, link) {
|
||||
pw_stream_flush(s->stream, false);
|
||||
}
|
||||
pw_stream_flush(impl->combine, false);
|
||||
impl->combine_id = pw_stream_get_node_id(impl->combine);
|
||||
pw_log_info("got combine id %d", impl->combine_id);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue