mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 12:03:02 +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();
|
ByteBufferDescriptor location = packet.getNewPayloadDescriptor();
|
||||||
|
|
||||||
|
if (location.length == 968) {
|
||||||
|
if (packet.getPacketIndex() < packet.getTotalPackets()) {
|
||||||
|
location.length = packet.getPayloadLength();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (location.length != 0)
|
while (location.length != 0)
|
||||||
{
|
{
|
||||||
// Remember the start of the NAL data in this packet
|
// Remember the start of the NAL data in this packet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user