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
1 changed files with 6 additions and 2 deletions
|
|
@ -495,10 +495,14 @@ static void reassembleFrame(int frameNumber) {
|
|||
qdu->decodeUnit.colorspace = (uint8_t)(qdu->decodeUnit.hdrActive ? COLORSPACE_REC_2020 : StreamConfig.colorSpace);
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
else {
|
||||
qdu->decodeUnit.frameType = FRAME_TYPE_PFRAME;
|
||||
}
|
||||
|
||||
nalChainHead = nalChainTail = NULL;
|
||||
nalChainDataLength = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue