Skip to content
Snippets Groups Projects
Commit ddbd05b7 authored by asavard's avatar asavard
Browse files

[#4367] Fix segfault in RTP mic fadein method

parent b4390a3f
No related branches found
No related tags found
No related merge requests found
...@@ -493,7 +493,11 @@ void AudioRtpRecordHandler::processDataDecode(unsigned char *spkrData, unsigned ...@@ -493,7 +493,11 @@ void AudioRtpRecordHandler::processDataDecode(unsigned char *spkrData, unsigned
bool AudioRtpRecordHandler::fadeIn(SFLDataFormat *audio, int size, SFLDataFormat *factor) bool AudioRtpRecordHandler::fadeIn(SFLDataFormat *audio, int size, SFLDataFormat *factor)
{ {
/*
// if factor reach 0, this function should no be called anymore
if(*factor <= 0)
return true;
// apply amplitude factor; // apply amplitude factor;
while(size){ while(size){
size--; size--;
...@@ -502,13 +506,8 @@ bool AudioRtpRecordHandler::fadeIn(SFLDataFormat *audio, int size, SFLDataFormat ...@@ -502,13 +506,8 @@ bool AudioRtpRecordHandler::fadeIn(SFLDataFormat *audio, int size, SFLDataFormat
// decrease factor // decrease factor
*factor /= FADEIN_STEP_SIZE; *factor /= FADEIN_STEP_SIZE;
// if factor reach 0, thsi function should no be called anymore
if(*factor == 0)
return true;
return false; return false;
*/
return true;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment