diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2022-12-07 00:09:39 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-06-16 20:01:21 +0300 |
commit | 8623012b30035dae057ef91dc4438f18a2c9801d (patch) | |
tree | 93d7391602e058302ac4e35ebe8012d80854bee9 /src/opus_decoder.c | |
parent | 0edb3954e863218f756cc637ecd10eb742b115b6 (diff) |
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; } |