Skip to content
Snippets Groups Projects
Verified Commit 579c9d6b authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Clear FEC buffer on new dred packet

Fixes "FEC buffer full" issue
parent 68eea61c
No related branches found
No related tags found
No related merge requests found
Subproject commit dc30fbef3fe48fa9e5d87860c6b21efb02db5f45 Subproject commit 0ac0d1df9a586db99b7ee00b69b3542d701c220e
...@@ -1118,10 +1118,13 @@ int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data, ...@@ -1118,10 +1118,13 @@ int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data,
if (payload != NULL) if (payload != NULL)
{ {
int min_feature_frames; int min_feature_frames;
silk_decoder_state *silk_dec;
silk_dec = (silk_decoder_state*)((char*)st+st->silk_dec_offset);
/*printf("Found: %p of size %d\n", payload, payload_len);*/ /*printf("Found: %p of size %d\n", payload, payload_len);*/
min_feature_frames = IMIN(2 + offset, 2*DRED_NUM_REDUNDANCY_FRAMES); min_feature_frames = IMIN(2 + offset, 2*DRED_NUM_REDUNDANCY_FRAMES);
st->nb_fec_frames = dred_decode_redundancy_package(&st->dred_decoder, st->fec_features, payload, payload_len, min_feature_frames); st->nb_fec_frames = dred_decode_redundancy_package(&st->dred_decoder, st->fec_features, payload, payload_len, min_feature_frames);
return 1; lpcnet_plc_fec_clear(silk_dec->sPLC.lpcnet);
return st->nb_fec_frames;
} }
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment