[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. e6ffec578de115ad63157a5a93ac1e6f3fc5ed59

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Jun 27 15:14:50 PDT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  c7ebe2b19124593a455478c638009af84fc45f73 (commit)

- Log -----------------------------------------------------------------
e6ffec5... make sure we call pa_sink_process_rewind() under all circumstances if a rewind was requested before we call pa_sink_render()
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-alsa-sink.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------

commit e6ffec578de115ad63157a5a93ac1e6f3fc5ed59
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sat Jun 28 00:14:46 2008 +0200

    make sure we call pa_sink_process_rewind() under all circumstances if a rewind was requested before we call pa_sink_render()

diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 5818dee..8e66f79 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -895,6 +895,9 @@ static int process_rewind(struct userdata *u) {
     rewind_nbytes = u->sink->thread_info.rewind_nbytes;
     u->sink->thread_info.rewind_nbytes = 0;
 
+    if (rewind_nbytes <= 0)
+        goto finish;
+
     pa_assert(rewind_nbytes > 0);
     pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
 
@@ -937,11 +940,17 @@ static int process_rewind(struct userdata *u) {
             pa_sink_process_rewind(u->sink, rewind_nbytes);
 
             u->after_rewind = TRUE;
+            return 0;
         }
     } else
         pa_log_debug("Mhmm, actually there is nothing to rewind.");
 
+finish:
+
+    pa_sink_process_rewind(u->sink, 0);
+
     return 0;
+
 }
 
 static void thread_func(void *userdata) {
@@ -967,12 +976,9 @@ static void thread_func(void *userdata) {
             int work_done;
             pa_usec_t sleep_usec;
 
-            if (u->sink->thread_info.rewind_requested) {
-                if (u->sink->thread_info.rewind_nbytes <= 0)
-                    pa_sink_process_rewind(u->sink, 0);
-                else if (process_rewind(u) < 0)
+            if (u->sink->thread_info.rewind_requested)
+                if (process_rewind(u) < 0)
                         goto fail;
-            }
 
             if (u->use_mmap)
                 work_done = mmap_write(u, &sleep_usec);

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list