Skip to content
Snippets Groups Projects
Commit c1ae2eba authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2464] IAX: send audio data only if nbSamples greater than zero

nbSamples=0 end up in an arithmetic exception in libiax
parent 469f57f5
No related branches found
No related tags found
No related merge requests found
...@@ -364,7 +364,7 @@ IAXVoIPLink::sendAudioFromMic (void) ...@@ -364,7 +364,7 @@ IAXVoIPLink::sendAudioFromMic (void)
_mutexIAX.enterMutex(); _mutexIAX.enterMutex();
// Make sure the session and the call still exists. // 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) { if (iax_send_voice (currentCall->getSession(), currentCall->getFormat(), micDataEncoded, compSize, nbSample_) == -1) {
_debug ("IAX: Error sending voice data.\n"); _debug ("IAX: Error sending voice data.\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment