Commit 20be876d authored by Thomas Guillem's avatar Thomas Guillem Committed by 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: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit 7de1c701a5a43fd5a5cbd236fa64d750a356c7de)
parent 55574f42
...@@ -561,6 +561,9 @@ static void Flush(audio_output_t *aout, bool wait) ...@@ -561,6 +561,9 @@ static void Flush(audio_output_t *aout, bool wait)
op = pa_stream_flush(s, NULL, NULL); op = pa_stream_flush(s, NULL, NULL);
if (op != NULL) if (op != NULL)
pa_operation_unref(op); pa_operation_unref(op);
sys->first_pts = VLC_TS_INVALID;
stream_stop(s, aout);
pa_threaded_mainloop_unlock(sys->mainloop); pa_threaded_mainloop_unlock(sys->mainloop);
} }
......
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