summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-02 03:07:54 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-02 03:07:54 +0200
commita0f4ffd3e12c0274ca05a577d03914270370b724 (patch)
treef0f53d8337bc665a1ba5065ba5843eeccc251851 /src
parentea82dec294310b83be25b4e0c940fd2cd2c7eeb3 (diff)
make sure we call pa_sink_process_rewind() if a rewind was requested under all circumstances
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-null-sink.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 9162960f..470c622e 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -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) {