Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-06-06 02:22:27 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-06-16 20:02:25 +0300
commit8b42b00647df1c0ef5dd81459e355f293a9a28b6 (patch)
tree58c696c9070166bddd1302463cb1b93dd85a5a77 /src
parent28503d92e8a44b4ad0313de8e3320a806e7683ce (diff)
Fix DRED for 10-ms frames
Diffstat (limited to 'src')
-rw-r--r--src/opus_decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 8f5e9682..d28a052a 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -670,7 +670,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data,
if (st->lpcnet.blend == 0) needed_feature_frames+=2;
for (i=0;i<needed_feature_frames;i++) {
int feature_offset = (needed_feature_frames-i-1 + (dred_offset/(st->Fs/100)-2));
- if (feature_offset <= 4*dred->nb_latents-1) {
+ if (feature_offset <= 4*dred->nb_latents-1 && feature_offset >= 0) {
lpcnet_plc_fec_add(&st->lpcnet, dred->fec_features+feature_offset*DRED_NUM_FEATURES);
} else {
lpcnet_plc_fec_add(&st->lpcnet, NULL);