diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2023-05-31 10:30:59 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-06-16 20:02:21 +0300 |
commit | ef4f459ec3e0ce2e0587009ef71dfd9dd8cf3f93 (patch) | |
tree | f1208cd944c3e65fbc1affc809adeace3c8f5a58 /src/opus_decoder.c | |
parent | 40b944b0baf7d8230845b1263172f2cd27b08b94 (diff) |
Cleanup (no change in behaviour)
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r-- | src/opus_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 6bb14ecb..d2008d7c 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -657,7 +657,8 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, lpcnet_plc_fec_clear(&silk_dec->sPLC.lpcnet); features_per_frame = frame_size/(st->Fs/100); needed_feature_frames = features_per_frame; - if (!silk_dec->sPLC.pre_filled) needed_feature_frames+=2; + /* if blend==0, the last PLC call was "update" and we need to feed two extra 10-ms frames. */ + if (silk_dec->sPLC.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)-1)*features_per_frame); if (feature_offset <= 4*dred->nb_latents-1) { |