mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 23:13:18 +08:00
pa_stream_write reportedly needs locking of the main loop
(could not find official documentation on this subject...) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25414 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
+3
-1
@@ -256,10 +256,12 @@ static void uninit(int immed) {
|
||||
|
||||
/** Play the specified data to the pulseaudio server */
|
||||
static int play(void* data, int len, int flags) {
|
||||
pa_threaded_mainloop_lock(mainloop);
|
||||
if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE) < 0) {
|
||||
GENERIC_ERR_MSG(context, "pa_stream_write() failed");
|
||||
return -1;
|
||||
len = -1;
|
||||
}
|
||||
pa_threaded_mainloop_unlock(mainloop);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user