diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-08-07 23:58:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-08-07 23:58:45 +0200 |
commit | 7d4916379bbf05384ad199004949cc220822aa5f (patch) | |
tree | ee2a106d411a9f6039d917041f2dbc45f34b8014 /src/pulsecore/source.c | |
parent | 51b3899348bf29dd88b56691aeea9f57895dfd14 (diff) |
ladspa/remap: make sure we process all requested rewinds unconditionally
In some situations a rewind request travelling downstream might be
optimized away on its way and an upstream rewind processing might never
come back. Hence, call _process_rewind() before each _render()just to
make sure we processed them all.
Diffstat (limited to 'src/pulsecore/source.c')
-rw-r--r-- | src/pulsecore/source.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index ad7462b1..b8af148f 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -592,15 +592,15 @@ void pa_source_process_rewind(pa_source *s, size_t nbytes) { pa_source_assert_ref(s); pa_assert(PA_SOURCE_IS_LINKED(s->thread_info.state)); - if (s->thread_info.state == PA_SOURCE_SUSPENDED) + if (nbytes <= 0) return; - if (nbytes <= 0) + if (s->thread_info.state == PA_SOURCE_SUSPENDED) return; pa_log_debug("Processing rewind..."); - while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL))) { + PA_HASHMAP_FOREACH(o, s->thread_info.outputs, state) { pa_source_output_assert_ref(o); pa_source_output_process_rewind(o, nbytes); } |