mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-16 16:35:47 +00:00
Fix some edge case on small MTU devices using qsv codec (#107)
Add fall back logic to prevent edge case where SPS SPP is not included in the same packet and key IDR frame is mislabeled as P frame causing assertion error at validation.
This commit is contained in:
parent
29f298ec88
commit
c86e0537d1
@ -495,10 +495,14 @@ static void reassembleFrame(int frameNumber) {
|
|||||||
qdu->decodeUnit.colorspace = (uint8_t)(qdu->decodeUnit.hdrActive ? COLORSPACE_REC_2020 : StreamConfig.colorSpace);
|
qdu->decodeUnit.colorspace = (uint8_t)(qdu->decodeUnit.hdrActive ? COLORSPACE_REC_2020 : StreamConfig.colorSpace);
|
||||||
|
|
||||||
// Invoke the key frame callback if needed
|
// Invoke the key frame callback if needed
|
||||||
if (qdu->decodeUnit.frameType == FRAME_TYPE_IDR) {
|
if (nalChainHead->bufferType != BUFFER_TYPE_PICDATA || qdu->decodeUnit.frameType == FRAME_TYPE_IDR) {
|
||||||
|
qdu->decodeUnit.frameType = FRAME_TYPE_IDR;
|
||||||
notifyKeyFrameReceived();
|
notifyKeyFrameReceived();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
qdu->decodeUnit.frameType = FRAME_TYPE_PFRAME;
|
||||||
|
}
|
||||||
|
|
||||||
nalChainHead = nalChainTail = NULL;
|
nalChainHead = nalChainTail = NULL;
|
||||||
nalChainDataLength = 0;
|
nalChainDataLength = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user