Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Nov 21, 2023
1 parent 25608a6 commit 8306067
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Demo/SwiftUI/TracyPlayer.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>inter-app-audio</key>
<true/>
</dict>
Expand Down
2 changes: 0 additions & 2 deletions Demo/demo-iOS/demo-iOS/demo-iOS.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion FFmpegKit
3 changes: 1 addition & 2 deletions Sources/KSPlayer/AVPlayer/KSAVPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,16 @@ class AVMediaPlayerTrack: MediaPlayerTrack {
nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
bitRate = Int64(track.assetTrack?.estimatedDataRate ?? 0)
isPlayable = false
formatDescription = track.assetTrack?.formatDescriptions.first as? CMFormatDescription
#else
name = track.assetTrack?.languageCode ?? ""
language = track.assetTrack?.extendedLanguageTag
nominalFrameRate = track.assetTrack?.nominalFrameRate ?? 24.0
bitRate = Int64(track.assetTrack?.estimatedDataRate ?? 0)
isPlayable = track.assetTrack?.isPlayable ?? false
#endif
// swiftlint:disable force_cast
formatDescription = (track.assetTrack?.formatDescriptions.first as! CMFormatDescription)
// swiftlint:enable force_cast
#endif
description = (formatDescription?.mediaSubType ?? .boxed).rawValue.string
#if os(xrOS)
Task {
Expand Down
2 changes: 1 addition & 1 deletion Sources/KSPlayer/MEPlayer/MEPlayerItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ extension MEPlayerItem {
// try again without the backwards flag to make it seek to the
// beginning.
if result < 0, options.seekFlags & AVSEEK_FLAG_BACKWARD == AVSEEK_FLAG_BACKWARD {
KSLog("seek to \(time) failed. seekFlags remove BACKWARD")
options.seekFlags &= ~AVSEEK_FLAG_BACKWARD
result = av_seek_frame(formatCtx, -1, timeStamp, options.seekFlags)
}
Expand All @@ -475,7 +476,6 @@ extension MEPlayerItem {
audioClock.positionTime = time
videoClock.positionTime = time
state = .reading

} else if state == .reading {
autoreleasepool {
reading()
Expand Down

0 comments on commit 8306067

Please sign in to comment.