Commit 36ea215d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

PulseAudio: clear all stream callbacks before disconnection

This should fix the infrequent assertions failures at exit.
(cherry picked from commit 2e09a58d867f214a18c964684712842a971d1919)

Conflicts:

	modules/audio_output/pulse.c
parent 5634da12
......@@ -626,15 +626,17 @@ static void Close (vlc_object_t *obj)
pa_threaded_mainloop_lock(mainloop);
if (s != NULL) {
pa_operation *op;
op = pa_stream_flush(s, NULL, NULL);
if (op != NULL)
pa_operation_unref(op);
op = pa_stream_drain(s, NULL, NULL);
if (op != NULL)
pa_operation_unref(op);
pa_stream_disconnect(s);
/* Clear all callbacks */
pa_stream_set_state_callback(s, NULL, NULL);
pa_stream_set_latency_update_callback(s, NULL, aout);
pa_stream_set_moved_callback(s, NULL, aout);
pa_stream_set_overflow_callback(s, NULL, aout);
pa_stream_set_started_callback(s, NULL, aout);
pa_stream_set_suspended_callback(s, NULL, aout);
pa_stream_set_underflow_callback(s, NULL, aout);
pa_stream_unref(s);
}
if (ctx != NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment