mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix H264 decoding artifacts when a frame has fewer than 3 bytes of padding at the end
This commit is contained in:
parent
421d73b28a
commit
6a695d2c72
@ -107,6 +107,15 @@ public class VideoDepacketizer {
|
||||
{
|
||||
ByteBufferDescriptor location = packet.getNewPayloadDescriptor();
|
||||
|
||||
if (location.length == 968) {
|
||||
if (packet.getPacketIndex() < packet.getTotalPackets()) {
|
||||
location.length = packet.getPayloadLength();
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while (location.length != 0)
|
||||
{
|
||||
// Remember the start of the NAL data in this packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user