summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-audiodev/pa_dev.c
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2011-01-13 16:42:21 +0000
committerLiong Sauw Ming <ming@teluu.com>2011-01-13 16:42:21 +0000
commita22edb7e705e27853307a483f60e16cf2a07ff9d (patch)
tree10799711be2748f52cb91bb32522c6e1f698bda0 /pjmedia/src/pjmedia-audiodev/pa_dev.c
parentcd50e094430a4105fb181d0c524445a97bb21d35 (diff)
Fix #1195: assertion during thread registration in coreaudio and portaudio's input/output callbacks on Mac OS X and #1196: using system's default audio input/output device instead of first available device.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3404 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-audiodev/pa_dev.c')
-rw-r--r--pjmedia/src/pjmedia-audiodev/pa_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia-audiodev/pa_dev.c b/pjmedia/src/pjmedia-audiodev/pa_dev.c
index 095f7725..1188b8ab 100644
--- a/pjmedia/src/pjmedia-audiodev/pa_dev.c
+++ b/pjmedia/src/pjmedia-audiodev/pa_dev.c
@@ -185,6 +185,7 @@ static int PaRecorderCallback(const void *input,
*/
if (stream->rec_thread_initialized == 0 || !pj_thread_is_registered())
{
+ pj_bzero(stream->rec_thread_desc, sizeof(pj_thread_desc));
status = pj_thread_register("pa_rec", stream->rec_thread_desc,
&stream->rec_thread);
stream->rec_thread_initialized = 1;
@@ -297,6 +298,7 @@ static int PaPlayerCallback( const void *input,
*/
if (stream->play_thread_initialized == 0 || !pj_thread_is_registered())
{
+ pj_bzero(stream->play_thread_desc, sizeof(pj_thread_desc));
status = pj_thread_register("portaudio", stream->play_thread_desc,
&stream->play_thread);
stream->play_thread_initialized = 1;