Commit 905f6d7a authored by Stephane Letz's avatar Stephane Letz
Browse files

Fix a bug in OPUS code in NetJack2.

parent c0f3d472
......@@ -149,8 +149,6 @@ struct JackNetExtMaster : public JackNetMasterInterface {
jack_master_t fRequest;
int fPacketTimeOut;
JackRingBuffer** fRingBuffer;
JackNetExtMaster(const char* ip,
......
......@@ -727,15 +727,15 @@ namespace Jack
fOpusMode = new OpusCustomMode*[fNPorts];
fOpusEncoder = new OpusCustomEncoder*[fNPorts];
fOpusDecoder = new OpusCustomDecoder*[fNPorts];
fCompressedSizesByte = new unsigned short [fNPorts];
fCompressedSizesByte = new unsigned short[fNPorts];
memset(fOpusMode, 0, fNPorts * sizeof(OpusCustomMode*));
memset(fOpusEncoder, 0, fNPorts * sizeof(OpusCustomEncoder*));
memset(fOpusDecoder, 0, fNPorts * sizeof(OpusCustomDecoder*));
memset(fCompressedSizesByte, 0, fNPorts * sizeof(int));
memset(fCompressedSizesByte, 0, fNPorts * sizeof(short));
int error = OPUS_OK;
for (int i = 0; i < fNPorts; i++) {
/* Allocate en/decoders */
fOpusMode[i] = opus_custom_mode_create(params->fSampleRate, params->fPeriodSize, &error);
......
......@@ -376,11 +376,10 @@ namespace Jack
CELTDecoder** fCeltDecoder;
int fCompressedSizeByte;
unsigned char** fCompressedBuffer;
size_t fLastSubPeriodBytesSize;
unsigned char** fCompressedBuffer;
void FreeCelt();
public:
......@@ -419,8 +418,8 @@ namespace Jack
OpusCustomEncoder** fOpusEncoder;
OpusCustomDecoder** fOpusDecoder;
unsigned short *fCompressedSizesByte;
int fCompressedMaxSizeByte;
unsigned short* fCompressedSizesByte;
size_t fLastSubPeriodBytesSize;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment