fix: 重复导入 + pts 表达式语法修正
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user