shithub: opus

Download patch

ref: 37a4e2e3d0743b3c8eca2a23e4c45e23b4d56f73
parent: 9a3f87391a537baaa29c8ba22f41e5488cfe9a1c
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Mon Dec 12 22:05:18 EST 2022

Fix the normal PLC case

--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -653,7 +653,7 @@
    /* 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);
--