summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2022-12-13 03:05:18 -0500
committerJean-Marc Valin <jmvalin@amazon.com>2022-12-13 03:05:18 -0500
commite213529ccb40f35c903594109d14b5557985ca85 (patch)
tree668f2203110d27b5beb1dabbefbffdc8bd0cce5b
parentef0edb13776c07a83463f1ea90e2bcd8d76ee092 (diff)
downloadopus-e213529ccb40f35c903594109d14b5557985ca85.tar.gz
Fix the normal PLC case
-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 7f61292a..70364e22 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -653,7 +653,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data,
/* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */
if ((decode_fec || len==0 || data==NULL) && frame_size%(st->Fs/400)!=0)
return OPUS_BAD_ARG;
- if (decode_fec > 0) {
+ if (decode_fec > 0 && silk_dec->sPLC.nb_fec_frames > 0) {
int features_per_frame;
int needed_feature_frames;
features_per_frame = frame_size/(st->Fs/100);