mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Fix off-by-one when looking for an I-frame NAL
Between finding the NAL and checking its type, reassembleFrame is called and overwrites the cachedSpecialDesc with the data and NAL type from the previous NAL. If the only IDR NAL in the packet is the last NAL in the packet, it gets missed and the depacketizer is stuck waiting for it.
This commit is contained in:
parent
a9f7b1aeab
commit
2d08f568e9
@ -274,6 +274,9 @@ public class VideoDepacketizer {
|
||||
// Reassemble any pending NAL
|
||||
reassembleFrame(packet.getFrameIndex());
|
||||
|
||||
// Reload cachedSpecialDesc after reassembleFrame overwrote it
|
||||
NAL.getSpecialSequenceDescriptor(location, cachedSpecialDesc);
|
||||
|
||||
if (isReferencePictureNalu(cachedSpecialDesc.data[cachedSpecialDesc.offset+cachedSpecialDesc.length])) {
|
||||
// This is the NALU code for I-frame data
|
||||
waitingForIdrFrame = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user