[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] time-smoother-2: Fix stream time when stream starts paused

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Thu Aug 25 10:48:20 UTC 2022



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
8fe50bbc by Georg Chini at 2022-08-25T08:11:04+02:00
time-smoother-2: Fix stream time when stream starts paused

When a stream is started but has not yet called smoother_2_put(), pa_smoother_2_get()
returns the time since the start of the stream even if the stream was started paused.
When the stream is started paused, pa_smoother_2_get() should return 0 instead. This
patch fixes the problem.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/745>

- - - - -


1 changed file:

- src/pulsecore/time-smoother_2.c


Changes:

=====================================
src/pulsecore/time-smoother_2.c
=====================================
@@ -295,7 +295,7 @@ pa_usec_t pa_smoother_2_get(pa_smoother_2 *s, pa_usec_t time_stamp) {
 
     /* If the smoother has not started, just return system time since resume */
     if (!s->start_time) {
-        if (time_stamp >= s->resume_time)
+        if (time_stamp >= s->resume_time && !s->paused)
             current_time = time_stamp - s->resume_time;
         else
             current_time = 0;



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/8fe50bbc31e11abf2f30864f1e2dbdaa16d0e1c3

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/8fe50bbc31e11abf2f30864f1e2dbdaa16d0e1c3
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220825/d3a8323e/attachment.htm>


More information about the pulseaudio-commits mailing list