sink,source: Fix corked stream handling in update_rate()

This fixes the conditional that checks for corked streams and prevents
rate updates.
This commit is contained in:
Arun Raghavan 2011-11-07 11:31:42 +05:30
parent 0a238f69ad
commit 75573435a0
2 changed files with 8 additions and 6 deletions

View file

@ -1385,9 +1385,10 @@ pa_bool_t pa_sink_update_rate(pa_sink *s, uint32_t rate, pa_bool_t passthrough)
desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
}
if (passthrough || pa_sink_linked_by(s) == 0) {
pa_sink_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
}
if (!passthrough && pa_sink_linked_by(s) > 0)
return FALSE;
pa_sink_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
if (s->update_rate(s, desired_rate) == TRUE) {
/* update monitor source as well */