mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +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:
parent
10165f3166
commit
cca7df6c25
@ -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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user