Skip to content

Commit

Permalink
Merge pull request swiftlang#9832 from moiseev/cmtimerange
Browse files Browse the repository at this point in the history
[overlay] Fix CMTimeRange.isValid
  • Loading branch information
moiseev authored May 22, 2017
2 parents 1019396 + 4179fcb commit e2155e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/public/SDK/CoreMedia/CMTimeRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ extension CMTimeRange {

public var isValid: Bool {
return self.start.isValid &&
self.duration.isValid && (self.duration.epoch == 0)
self.duration.isValid &&
(self.duration.epoch == 0) &&
(self.duration.value >= 0)
}

public var isIndefinite: Bool {
Expand Down

0 comments on commit e2155e2

Please sign in to comment.