From f635303f2ace4c7089656a7846ad3fba62863692 Mon Sep 17 00:00:00 2001 From: QianheYu Date: Sun, 31 May 2026 12:47:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E5=A4=8D=E5=AF=BC=E5=85=A5=20+?= =?UTF-8?q?=20pts=20=E8=A1=A8=E8=BE=BE=E5=BC=8F=E8=AF=AD=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miracast/protocol/airplay/AirPlayProtocol.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/qwenpaw/miracast/protocol/airplay/AirPlayProtocol.kt b/app/src/main/java/com/qwenpaw/miracast/protocol/airplay/AirPlayProtocol.kt index 1cb2ea7..681ee72 100644 --- a/app/src/main/java/com/qwenpaw/miracast/protocol/airplay/AirPlayProtocol.kt +++ b/app/src/main/java/com/qwenpaw/miracast/protocol/airplay/AirPlayProtocol.kt @@ -8,7 +8,6 @@ import com.dd.plist.NSDictionary import com.dd.plist.NSNumber import com.dd.plist.NSString import com.dd.plist.PropertyListParser -import com.dd.plist.PropertyListParser import kotlinx.coroutines.* import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator import org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters @@ -525,12 +524,14 @@ class AirPlayProtocol( } val isKeyFrame = payloadType == 1 || isKeyFrameNAL(decrypted) - val pts = if (data.size >= 12) { + val pts: Long = if (data.size >= 12) { ((data[8].toInt() and 0xFF).toLong() shl 24) or - ((data[9].toInt() and 0xFF).toLong() shl 16) or - ((data[10].toInt() and 0xFF).toLong() shl 8) or - (data[11].toInt() and 0xFF).toLong()) - } else 0L + ((data[9].toInt() and 0xFF).toLong() shl 16) or + ((data[10].toInt() and 0xFF).toLong() shl 8) or + (data[11].toInt() and 0xFF).toLong() + } else { + 0L + } onVideoData(decrypted, 0, decrypted.size, isKeyFrame, pts * 1000) } catch (e: Exception) {