diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2022-12-06 16:09:39 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2022-12-06 16:09:39 -0500 |
commit | 9e1ee2db214da345720d619ebc82a1b03198d961 (patch) | |
tree | e2653aff27e464b110cde3c52d241999d85d0730 /src/opus_decoder.c | |
parent | f2226dca4cf9892fdddb9e50bf00368e9f8e02b3 (diff) | |
download | opus-9e1ee2db214da345720d619ebc82a1b03198d961.tar.gz |
DRED integration work in progress
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r-- | src/opus_decoder.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c index 8cd58a91..2ca93f44 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -1054,6 +1054,8 @@ int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data, /* Get the padding section of the packet. */ ret = opus_packet_parse_impl(data, len, 0, NULL, frames, size, NULL, NULL, &data0, &len0); + if (ret < 0) + return ret; data = data0; len = len0; /* Scan extensions in order until we find the earliest frame with DRED data. */ @@ -1085,6 +1087,9 @@ int opus_decoder_dred_input(OpusDecoder *st, const unsigned char *data, } if (payload != NULL) { + silk_decoder_state *silk_dec; + silk_dec = (silk_decoder_state*)((char*)st+st->silk_dec_offset); + dred_decode_redundancy_package(&silk_dec->sPLC.dred_decoder, silk_dec->sPLC.fec_features, payload, payload_len); /* Found something -- do the decoding. */ return 1; } |