mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added a new method rs_malloc that checks its arguments and prints a stacktrace on error/weird call. Changed the code everywhere to use this instead of malloc. Removed some mallocs and replaced with RsTemporaryMemory
This commit is contained in:
parent
9c6e7dfc13
commit
d13526facd
39 changed files with 274 additions and 132 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "SpeexProcessor.h"
|
||||
|
||||
#include <util/rsmemory.h>
|
||||
#include <speex/speex.h>
|
||||
#include <speex/speex_preprocess.h>
|
||||
|
||||
|
@ -350,7 +351,11 @@ void SpeexOutputProcessor::putNetworkPacket(QString name, QByteArray packet) {
|
|||
if (userJitterHash.contains(name)) {
|
||||
userJitter = userJitterHash.value(name);
|
||||
} else {
|
||||
userJitter = (SpeexJitter*)malloc(sizeof(SpeexJitter));
|
||||
userJitter = (SpeexJitter*)rs_safe_malloc(sizeof(SpeexJitter));
|
||||
|
||||
if(!userJitter)
|
||||
return ;
|
||||
|
||||
speex_jitter_init(userJitter, speex_decoder_init(&speex_wb_mode), SAMPLING_RATE);
|
||||
int on = 1;
|
||||
speex_decoder_ctl(userJitter->dec, SPEEX_SET_ENH, &on);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue