[vlc-commits] PulseAudio: fix audio drop after a flush

Thomas Guillem git at videolan.org
Sat Apr 18 11:23:04 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Apr 18 01:18:35 2015 +0200| [7de1c701a5a43fd5a5cbd236fa64d750a356c7de] | committer: Rémi Denis-Courmont

PulseAudio: fix audio drop after a flush

It happens when pa_stream_write is called too late after a flush.
This fixes audio drop when the track has a positive delay.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7de1c701a5a43fd5a5cbd236fa64d750a356c7de
---

 modules/audio_output/pulse.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 5947ceb..a0060c8 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -561,6 +561,9 @@ static void Flush(audio_output_t *aout, bool wait)
         op = pa_stream_flush(s, NULL, NULL);
     if (op != NULL)
         pa_operation_unref(op);
+    sys->first_pts = VLC_TS_INVALID;
+    stream_stop(s, aout);
+
     pa_threaded_mainloop_unlock(sys->mainloop);
 }
 



More information about the vlc-commits mailing list