diff options
author | Georg Chini <georg@chini.tk> | 2019-07-03 12:32:16 +0200 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2019-07-03 10:52:20 +0000 |
commit | 1240afabfa792c1a3ba2b766c9c7bc0b3aae4b0f (patch) | |
tree | 2b8d743134bd6d73a37e12d46891d783d5f95f0a | |
parent | f89d64b98e12bb71b6aa94fcef31eafc060f9759 (diff) | |
download | pulseaudio-1240afabfa792c1a3ba2b766c9c7bc0b3aae4b0f.tar.gz |
source-output: Fix rewinding bug
Currently the rewind logic for the source output is broken if the output
does not implement a process_rewind() callback. In that case, the read
index of the delay memblockq is rewound. This is wrong, because the data
that is going to be re-written was not yet read. Instead the write index
should be rewound and the read index left untouched. This is the reason
for the rewind glitches of monitor sources.
-rw-r--r-- | src/pulsecore/source-output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index 1ab90abd6..f5005abb6 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -866,7 +866,7 @@ void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes /* in so pa_resampler_rewind(o->thread_info.resampler, nbytes); } else - pa_memblockq_rewind(o->thread_info.delay_memblockq, nbytes); + pa_memblockq_seek(o->thread_info.delay_memblockq, - ((int64_t) nbytes), PA_SEEK_RELATIVE, true); } /* Called from thread context */ |