Skip to content
Snippets Groups Projects
Commit 90504256 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2
Browse files

fix audio loop being restarted when call is on hold

This caused an "infinite loop" for audio media resulting
in CPU being overcharged for nothing

This fix the problem on MacOS and on GNU/Linux when using PulseAudio
There is still a similar problem with Alsa.

Change-Id: I70e111c59125143d60b657898b04a0b65a638bd6
Tuleap: #576
parent 1e249e4f
No related branches found
No related tags found
No related merge requests found
......@@ -842,12 +842,17 @@ SIPCall::startAllMedia()
#endif
rtp->updateMedia(remote, local);
if (isIceRunning()) {
rtp->start(newIceSocket(ice_comp_id + 0),
newIceSocket(ice_comp_id + 1));
ice_comp_id += 2;
} else
rtp->start();
// Not restarting media loop on hold as it's a huge waste of CPU ressources
// because of the audio loop
if (getState() != CallState::HOLD) {
if (isIceRunning()) {
rtp->start(newIceSocket(ice_comp_id + 0),
newIceSocket(ice_comp_id + 1));
ice_comp_id += 2;
} else
rtp->start();
}
switch (local.type) {
#ifdef RING_VIDEO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment