vlc/vlc-2.2 | branch: master | Thomas Guillem <tho...@gllm.fr> | Sat Apr 18 
01:18:35 2015 +0200| [20be876d7c1b39b4a8072ff913d9bdf95300d2e4] | 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 <r...@remlab.net>
(cherry picked from commit 7de1c701a5a43fd5a5cbd236fa64d750a356c7de)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=20be876d7c1b39b4a8072ff913d9bdf95300d2e4
---

 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 069cf6a..231769d 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);
 }
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to