diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2023-06-06 02:22:27 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-06-16 20:02:25 +0300 |
commit | 8b42b00647df1c0ef5dd81459e355f293a9a28b6 (patch) | |
tree | 58c696c9070166bddd1302463cb1b93dd85a5a77 /src/opus_decoder.c | |
parent | 28503d92e8a44b4ad0313de8e3320a806e7683ce (diff) |
Fix DRED for 10-ms frames
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r-- | src/opus_decoder.c | 2 |
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); |