sink, source: Return early from pa_*_update_rate(), if there's no need to do anything

This commit is contained in:
Tanu Kaskinen 2013-08-09 09:38:02 +03:00
parent 963da3de93
commit 1cd6a3ad70
2 changed files with 6 additions and 0 deletions

View file

@ -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;