Changed pasound.c to handle situation when NULL is passed as input/output buffer by PortAudio

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@760 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2006-10-10 18:33:55 +00:00
parent 6d42358cb2
commit 525b391d84
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,9 @@ static int PaRecorderCallback(const void *input,
if (stream->quit_flag)
goto on_break;
if (input == NULL)
return paContinue;
if (stream->thread_initialized == 0) {
status = pj_thread_register("pa_rec", stream->thread_desc,
&stream->thread);
@ -129,6 +132,9 @@ static int PaPlayerCallback( const void *input,
if (stream->quit_flag)
goto on_break;
if (output == NULL)
return paContinue;
if (stream->thread_initialized == 0) {
status = pj_thread_register("portaudio", stream->thread_desc,
&stream->thread);