diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-02 00:45:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-02 00:45:54 +0100 |
commit | a9e9ab32a280956a29a82876f121d7409705818b (patch) | |
tree | 85096f87d4e4cb2027a6c679f81570dd8c8991e6 /src/pulsecore/sink.c | |
parent | 5fc11a0724d19ef634c4aaf9147f5f9b82f5c216 (diff) |
shortcut pa_sink_process_rewind() when no rewind is happenning and none was requested
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 4c822b3d..b149bb6e 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -544,6 +544,11 @@ void pa_sink_process_rewind(pa_sink *s, size_t nbytes) { pa_sink_assert_ref(s); pa_assert(PA_SINK_IS_LINKED(s->thread_info.state)); + /* If nobody requested this and this is actually no real rewind + * then we can short cut this */ + if (!s->thread_info.rewind_requested && nbytes <= 0) + return; + s->thread_info.rewind_nbytes = 0; s->thread_info.rewind_requested = FALSE; |