diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-08-09 09:38:02 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-08-27 12:02:32 +0300 |
commit | 1cd6a3ad70f04511c45bd41b0533e77c03ad8a3e (patch) | |
tree | 0570d0f0110e115d8dcabc1504023a5461ed335f /src/pulsecore/sink.c | |
parent | 963da3de93ed814e23e3e3dc3bca6339af80f960 (diff) | |
download | pulseaudio-1cd6a3ad70f04511c45bd41b0533e77c03ad8a3e.tar.gz |
sink, source: Return early from pa_*_update_rate(), if there's no need to do anything
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 2c33af4de..bc8a3fdc1 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1386,6 +1386,9 @@ bool pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) { pa_sink_input *i; bool use_alternate = false; + if (rate == s->sample_spec.rate) + return true; + if (!s->update_rate) return false; |