mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
make sure we call pa_sink_process_rewind() if a rewind was requested under all circumstances
This commit is contained in:
parent
ea82dec294
commit
a0f4ffd3e1
1 changed files with 7 additions and 2 deletions
|
|
@ -137,13 +137,13 @@ static void process_rewind(struct userdata *u, pa_usec_t now) {
|
|||
pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
|
||||
|
||||
if (u->timestamp <= now)
|
||||
return;
|
||||
goto do_nothing;
|
||||
|
||||
delay = u->timestamp - now;
|
||||
in_buffer = pa_usec_to_bytes(delay, &u->sink->sample_spec);
|
||||
|
||||
if (in_buffer <= 0)
|
||||
return;
|
||||
goto do_nothing;
|
||||
|
||||
if (rewind_nbytes > in_buffer)
|
||||
rewind_nbytes = in_buffer;
|
||||
|
|
@ -152,6 +152,11 @@ static void process_rewind(struct userdata *u, pa_usec_t now) {
|
|||
u->timestamp -= pa_bytes_to_usec(rewind_nbytes, &u->sink->sample_spec);
|
||||
|
||||
pa_log_debug("Rewound %lu bytes.", (unsigned long) rewind_nbytes);
|
||||
return;
|
||||
|
||||
do_nothing:
|
||||
|
||||
pa_sink_process_rewind(u->sink, 0);
|
||||
}
|
||||
|
||||
static void process_render(struct userdata *u, pa_usec_t now) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue