- fix AMR-WB decoder

This commit is contained in:
2026-02-24 10:47:38 +03:00
parent bdc4858bcc
commit b5fe9e59c4
4 changed files with 28 additions and 26 deletions
+3 -2
View File
@@ -681,8 +681,9 @@ AudioReceiver::DecodeResult AudioReceiver::decodePacketTo(Audio::DataWindow& out
else
{
// Decode frame by frame
auto r = mCodec->decode({rtp.GetPayloadData() + i * mCodec->rtpLength(), (size_t)frameLength},
{(uint8_t*)mDecodedFrame, sizeof mDecodedFrame});
auto codecInput = std::span{rtp.GetPayloadData() + i * mCodec->rtpLength(), (size_t)frameLength};
auto codecOutput = std::span{(uint8_t*)mDecodedFrame, sizeof mDecodedFrame};
auto r = mCodec->decode(codecInput, codecOutput);
mDecodedLength = r.mDecoded;
if (mDecodedLength > 0)
processDecoded(output, options);