Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > main-testing-src > by-pkgid > 21c921d7e2a28ff702b2a7da09d43ed6 > files > 88

pulseaudio-0.9.21-26.0.4mdv2010.1.src.rpm

From eef247b57e97841525a89c26f1eb35c52bf1af9e Mon Sep 17 00:00:00 2001
From: Colin Guthrie <cguthrie@mandriva.org>
Date: Tue, 14 Sep 2010 19:44:57 +0100
Subject: [PATCH 187/187] 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().
---
 src/modules/alsa/alsa-sink.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 935b1f8..112f02e 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1420,6 +1420,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);
@@ -1457,7 +1459,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)
-- 
1.7.2.3