[vlc-devel] [RFC PATCH 7/9] pulse: Drain: use vlc_pa_get_latency() directly
Thomas Guillem
thomas at gllm.fr
Thu Dec 10 18:10:13 CET 2020
---
modules/audio_output/pulse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 73b2c2f696..709f085c6f 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -580,8 +580,8 @@ static void Drain(audio_output_t *aout)
/* XXX: Loosy drain emulation.
* See #18141: drain callback is never received */
- vlc_tick_t delay;
- if (TimeGet(aout, &delay) == 0 && delay <= VLC_TICK_FROM_SEC(5))
+ vlc_tick_t delay = vlc_pa_get_latency(aout, sys->context, s);
+ if (delay != VLC_TICK_INVALID && delay > 0)
{
pa_threaded_mainloop_unlock(sys->mainloop);
vlc_tick_sleep(delay);
--
2.29.2
More information about the vlc-devel
mailing list