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:
parent
6d42358cb2
commit
525b391d84
|
@ -84,6 +84,9 @@ static int PaRecorderCallback(const void *input,
|
||||||
if (stream->quit_flag)
|
if (stream->quit_flag)
|
||||||
goto on_break;
|
goto on_break;
|
||||||
|
|
||||||
|
if (input == NULL)
|
||||||
|
return paContinue;
|
||||||
|
|
||||||
if (stream->thread_initialized == 0) {
|
if (stream->thread_initialized == 0) {
|
||||||
status = pj_thread_register("pa_rec", stream->thread_desc,
|
status = pj_thread_register("pa_rec", stream->thread_desc,
|
||||||
&stream->thread);
|
&stream->thread);
|
||||||
|
@ -129,6 +132,9 @@ static int PaPlayerCallback( const void *input,
|
||||||
if (stream->quit_flag)
|
if (stream->quit_flag)
|
||||||
goto on_break;
|
goto on_break;
|
||||||
|
|
||||||
|
if (output == NULL)
|
||||||
|
return paContinue;
|
||||||
|
|
||||||
if (stream->thread_initialized == 0) {
|
if (stream->thread_initialized == 0) {
|
||||||
status = pj_thread_register("portaudio", stream->thread_desc,
|
status = pj_thread_register("portaudio", stream->thread_desc,
|
||||||
&stream->thread);
|
&stream->thread);
|
||||||
|
|
Loading…
Reference in New Issue