mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
sink-input: fix rewriting render memblockq when nothing should be rewound
If process_rewind() is called with nbytes = 0, process_rewind() will nevertheless request a rewrite of the render memblockq. This patch fixes the problem by adding the render memblockq length to the rewrite amount only if nbytes > 0.
This commit is contained in:
parent
1240afabfa
commit
4c6bab4353
1 changed files with 3 additions and 1 deletions
|
|
@ -1094,7 +1094,9 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
|
||||||
size_t max_rewrite, amount;
|
size_t max_rewrite, amount;
|
||||||
|
|
||||||
/* Calculate how much make sense to rewrite at most */
|
/* Calculate how much make sense to rewrite at most */
|
||||||
max_rewrite = nbytes + lbq;
|
max_rewrite = nbytes;
|
||||||
|
if (nbytes > 0)
|
||||||
|
max_rewrite += lbq;
|
||||||
|
|
||||||
/* Transform into local domain */
|
/* Transform into local domain */
|
||||||
if (i->thread_info.resampler)
|
if (i->thread_info.resampler)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue