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:
1 parent
65792a201f
commit
8f186a3535
1 file changed
+3
-1
+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