mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-12-01 18:24:00 +00:00
Perform PLC for each lost packet in the FEC block
This commit is contained in:
1 parent
a8aed6b344
commit
509a17dbc3
2 files changed
+33
-15
No files matched your search
+8
-4
@@ -153,13 +153,17 @@ static bool queuePacketToLbq(PQUEUED_AUDIO_PACKET* packet) {
|
||||
}
|
||||
|
||||
static void decodeInputData(PQUEUED_AUDIO_PACKET packet) {
|
||||
PRTP_PACKET rtp;
|
||||
// If the packet size is zero, this is a placeholder for a missing
|
||||
// packet. Trigger packet loss concealment logic in libopus by
|
||||
// invoking the decoder with a NULL buffer.
|
||||
if (packet->header.size == 0) {
|
||||
AudioCallbacks.decodeAndPlaySample(NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
rtp = (PRTP_PACKET)&packet->data[0];
|
||||
PRTP_PACKET rtp = (PRTP_PACKET)&packet->data[0];
|
||||
if (lastSeq != 0 && (unsigned short)(lastSeq + 1) != rtp->sequenceNumber) {
|
||||
Limelog("Received OOS audio data (expected %d, but got %d)\n", lastSeq + 1, rtp->sequenceNumber);
|
||||
|
||||
AudioCallbacks.decodeAndPlaySample(NULL, 0);
|
||||
}
|
||||
|
||||
lastSeq = rtp->sequenceNumber;
|
||||
|
||||
Reference in new issue
Block a user