summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2010-09-14 19:44:57 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-09-14 19:44:57 +0100
commit2ecd764662174bf81b90cfa057104dec103bfeec (patch)
tree0e4408bf60942c10867420b1b7a68d3d9861b841 /src/modules/alsa/alsa-sink.c
parentf97faae006c0acbcd33056008196f3651fe5b0d3 (diff)
alsa: Only set the 'first' flag to false when we actually call snd_pcm_start()
Previously, if work_done was false, we could conceivably not call snd_pcm_start().
Diffstat (limited to 'src/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index e62dcc06..1108a797 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1417,6 +1417,8 @@ static void thread_func(void *userdata) {
snd_pcm_start(u->pcm_handle);
pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
+
+ u->first = FALSE;
}
update_smoother(u);
@@ -1454,7 +1456,6 @@ static void thread_func(void *userdata) {
pa_rtpoll_set_timer_relative(u->rtpoll, PA_MIN(sleep_usec, cusec));
}
- u->first = FALSE;
u->after_rewind = FALSE;
} else if (u->use_tsched)