summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/opus_decoder.c3
-rw-r--r--src/opus_encoder.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 670a898d..555eed28 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -904,7 +904,6 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...)
break;
case OPUS_RESET_STATE:
{
- dred_deinit_decoder(&st->dred_decoder);
OPUS_CLEAR((char*)&st->OPUS_DECODER_RESET_START,
sizeof(OpusDecoder)-
((char*)&st->OPUS_DECODER_RESET_START - (char*)st));
@@ -1075,6 +1074,7 @@ int opus_decoder_get_nb_samples(const OpusDecoder *dec,
int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data,
opus_int32 len, int offset)
{
+#ifdef ENABLE_NEURAL_FEC
const unsigned char *data0;
int len0;
const unsigned char *payload = NULL;
@@ -1128,5 +1128,6 @@ int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data,
lpcnet_plc_fec_clear(silk_dec->sPLC.lpcnet);
return st->nb_fec_frames;
}
+#endif
return 0;
}
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index f05b3829..67200da8 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1884,10 +1884,12 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
st->silk_bw_switch = 1;
}
} else {
+#ifdef ENABLE_NEURAL_FEC
/* If we're not in SILK mode, delete all the processed DRED.
TODO: Remove this if/when DRED gets encoded for CELT. */
DREDEnc *dred = &((silk_encoder*)silk_enc)->state_Fxx[0].sCmn.dred_encoder;
dred->latents_buffer_fill = 0;
+#endif
}
/* CELT processing */