From a22edb7e705e27853307a483f60e16cf2a07ff9d Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Thu, 13 Jan 2011 16:42:21 +0000 Subject: 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 --- pjmedia/src/pjmedia-audiodev/pa_dev.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pjmedia/src/pjmedia-audiodev/pa_dev.c') 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; -- cgit v1.2.3