mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 02:20:55 +00:00
Reassemble AVC NALs when padding is reached, rather than waiting through several packets until the next AVC frame start NAL. Improves video latency and vulnerability to packet loss.
This commit is contained in:
@@ -168,9 +168,16 @@ public class AvVideoDepacketizer {
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not either sequence we want
|
||||
// Check if this is padding after a full AVC frame
|
||||
if (currentlyDecoding == AvDecodeUnit.TYPE_H264 &&
|
||||
NAL.isPadding(specialSeq)) {
|
||||
// The decode unit is complete
|
||||
reassembleAvcNal();
|
||||
}
|
||||
|
||||
// Not decoding AVC
|
||||
currentlyDecoding = AvDecodeUnit.TYPE_UNKNOWN;
|
||||
|
||||
|
||||
// Just skip this byte
|
||||
location.length--;
|
||||
location.offset++;
|
||||
|
||||
Reference in New Issue
Block a user