[vlc-devel] [RFC] PulseAudio: fix audio drop after a flush
Thomas Guillem
thomas at gllm.fr
Sat Apr 18 01:18:35 CEST 2015
It happens when pa_stream_write is called too late after a flush.
This fixes audio drop when the track has a positive delay.
---
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);
}
--
2.1.4
More information about the vlc-devel
mailing list