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:
reimar
2007-12-15 17:10:06 +00:00
parent 65792a201f
commit 8f186a3535
+3 -1
View File
@@ -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;
}