Skip to content

Commit

Permalink
fix #700
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Dec 22, 2023
1 parent 474dfc5 commit 9093f90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/KSPlayer/AVPlayer/KSOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ open class KSOptions {
#endif
let diff = nextVideoTime - desire
// print("[video] video diff \(diff) nextVideoTime \(nextVideoTime) main \(main.time.seconds)")
if diff >= 1 / Double(fps * 4 / 3) {
if diff >= 1 / Double(fps * 2) {
videoClockDelayCount = 0
return (diff, .remain)
} else {
Expand Down
6 changes: 1 addition & 5 deletions Sources/KSPlayer/MEPlayer/FFmpegDecode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,8 @@ class FFmpegDecode: DecodeProtocol {
if timestamp < 0 {
timestamp = bestEffortTimestamp
}
if timestamp == bestEffortTimestamp {
bestEffortTimestamp += frame.duration
timestamp = bestEffortTimestamp
}
frame.timestamp = timestamp
bestEffortTimestamp = timestamp
bestEffortTimestamp = timestamp + frame.duration
completionHandler(.success(frame))
} catch {
completionHandler(.failure(error))
Expand Down

0 comments on commit 9093f90

Please sign in to comment.