- properly handle the badly decoded audio (which can happen due to payload type <-> codec inconsistency)

This commit is contained in:
2024-11-16 16:33:21 +03:00
parent 9afbd9e0fd
commit 4d7ca3e4f3
2 changed files with 3 additions and 2 deletions

View File

@@ -638,8 +638,7 @@ AudioReceiver::DecodeResult AudioReceiver::getAudio(Audio::DataWindow& output, i
// Decode frame by frame
mDecodedLength = mCodec->decode(p->rtp()->GetPayloadData() + i * mCodec->rtpLength(),
frameLength, mDecodedFrame, sizeof mDecodedFrame);
// mDecodedLength = 3840; // Opus 20 ms stereo
if (mDecodedLength)
if (mDecodedLength > 0)
processDecoded(output, options);
}
}