[vlc-devel] commit: pulseaudio: disable pa_stream_drain on close (Ilkka Ollakka )
git version control
git at videolan.org
Sat Feb 13 15:54:53 CET 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Feb 13 16:50:14 2010 +0200| [376635fa5db90bc4562aa550a925871110e82bdd] | committer: Ilkka Ollakka
pulseaudio: disable pa_stream_drain on close
I didn't find any reason to do it, and it slows closing quite a lot,
if you know why we should do that, please speak up etc.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=376635fa5db90bc4562aa550a925871110e82bdd
---
modules/audio_output/pulse.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 0195192..8ef3e4c 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -342,6 +342,11 @@ static void Close ( vlc_object_t *p_this )
pa_threaded_mainloop_lock(p_sys->mainloop);
pa_stream_set_write_callback(p_sys->stream, NULL, NULL);
+/* I didn't find any explanation why we need to do pa_stream_drain on close
+ * as we don't really care if we lose 20ms buffer in this point anyway?
+ * And disabling this speeds up closing pulseaudio quite a lot (atleast for me).
+ */
+#if 0
if((o = pa_stream_drain(p_sys->stream, success_cb, p_aout))){
while (pa_operation_get_state(o) != PA_OPERATION_DONE) {
CHECK_DEAD_GOTO(fail);
@@ -352,7 +357,7 @@ static void Close ( vlc_object_t *p_this )
pa_operation_unref(o);
}
-
+#endif
pa_threaded_mainloop_unlock(p_sys->mainloop);
}
uninit(p_aout);
More information about the vlc-devel
mailing list