[vlc-devel] [PATCH] pulse: fix playback with very small inputs

Rémi Denis-Courmont remi at remlab.net
Fri Jul 12 14:29:36 CEST 2019


Probably OK

Le 12 juillet 2019 14:14:12 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>---
> modules/audio_output/pulse.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
>diff --git a/modules/audio_output/pulse.c
>b/modules/audio_output/pulse.c
>index 1091affcac..fba8fd6840 100644
>--- a/modules/audio_output/pulse.c
>+++ b/modules/audio_output/pulse.c
>@@ -555,6 +555,21 @@ static void Drain(audio_output_t *aout)
>     pa_stream *s = sys->stream;
> 
>     pa_threaded_mainloop_lock(sys->mainloop);
>+
>+    if (unlikely(pa_stream_is_corked(s) > 0))
>+    {
>+        /* Drain while the stream is corked. It happens with very
>small input
>+         * when the stream is drained while the start is still being
>deferred.
>+         * In that case, we need start the stream before we actually
>drain it.
>+         * */
>+        if (sys->trigger != NULL)
>+        {
>+            vlc_pa_rttime_free(sys->mainloop, sys->trigger);
>+            sys->trigger = NULL;
>+        }
>+        stream_start_now(s, aout);
>+    }
>+
>     pa_operation *op = pa_stream_drain(s, NULL, NULL);
>     if (op != NULL)
>         pa_operation_unref(op);
>-- 
>2.20.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190712/0765718c/attachment.html>


More information about the vlc-devel mailing list