[webrtc] Only init WebRtcAec callbacks once.

This commit is contained in:
Fedor 2020-11-26 05:42:22 +02:00
parent b7459cf8ab
commit 270d402d1f
1 changed files with 21 additions and 17 deletions

View File

@ -23,6 +23,7 @@
#include <stddef.h> // size_t
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "webrtc/common_audio/ring_buffer.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
@ -1573,6 +1574,9 @@ AecCore* WebRtcAec_CreateAec() {
#endif
aec->extended_filter_enabled = 0;
static bool initted = false;
if (!initted) {
initted = true;
// Assembly optimization
WebRtcAec_FilterFar = FilterFar;
WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;
@ -1598,8 +1602,8 @@ AecCore* WebRtcAec_CreateAec() {
WebRtcAec_InitAec_neon();
}
#endif
aec_rdft_init();
}
return aec;
}