[pulseaudio-commits] r1977 - /trunk/src/pulsecore/time-smoother.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Oct 29 09:38:58 PDT 2007


Author: lennart
Date: Mon Oct 29 17:38:57 2007
New Revision: 1977

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1977&root=pulseaudio&view=rev
Log:
properly deal with time pausing

Modified:
    trunk/src/pulsecore/time-smoother.c

Modified: trunk/src/pulsecore/time-smoother.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/time-smoother.c?rev=1977&root=pulseaudio&r1=1976&r2=1977&view=diff
==============================================================================
--- trunk/src/pulsecore/time-smoother.c (original)
+++ trunk/src/pulsecore/time-smoother.c Mon Oct 29 17:38:57 2007
@@ -310,8 +310,9 @@
     /* Fix up x value */
     if (s->paused)
         x = s->pause_time;
-    else
-        x -= s->time_offset;
+
+    pa_assert(x >= s->time_offset);
+    x -= s->time_offset;
 
     pa_assert(x >= s->ex);
 
@@ -342,8 +343,9 @@
     /* Fix up x value */
     if (s->paused)
         x = s->pause_time;
-    else
-        x -= s->time_offset;
+
+    pa_assert(x >= s->time_offset);
+    x -= s->time_offset;
 
     pa_assert(x >= s->ex);
 
@@ -373,6 +375,8 @@
     if (!s->paused)
         return;
 
+    pa_assert(x >= s->pause_time);
+
     s->paused = FALSE;
     s->time_offset += x - s->pause_time;
 }




More information about the pulseaudio-commits mailing list