From c1ae2ebaa0bb13fe41ec61b57744ce380482591e Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)> Date: Mon, 23 Nov 2009 11:02:15 -0500 Subject: [PATCH] [#2464] IAX: send audio data only if nbSamples greater than zero nbSamples=0 end up in an arithmetic exception in libiax --- sflphone-common/src/iax/iaxvoiplink.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sflphone-common/src/iax/iaxvoiplink.cpp b/sflphone-common/src/iax/iaxvoiplink.cpp index f48d9a2c4e..b6377ea7f4 100644 --- a/sflphone-common/src/iax/iaxvoiplink.cpp +++ b/sflphone-common/src/iax/iaxvoiplink.cpp @@ -364,7 +364,7 @@ IAXVoIPLink::sendAudioFromMic (void) _mutexIAX.enterMutex(); // Make sure the session and the call still exists. - if (currentCall->getSession() && micDataEncoded != NULL) { + if (currentCall->getSession() && (micDataEncoded != NULL) && (nbSample_ > 0)) { if (iax_send_voice (currentCall->getSession(), currentCall->getFormat(), micDataEncoded, compSize, nbSample_) == -1) { _debug ("IAX: Error sending voice data.\n"); } -- GitLab