Skip to content

Commit

Permalink
inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jun 8, 2024
1 parent 9f745df commit aa12d66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// CMTime+invert.swift
// CMTime+inverted.swift
// VisionCamera
//
// Created by Marc Rousavy on 08.06.24.
Expand All @@ -13,7 +13,7 @@ extension CMTime {
Inverts the time.
e.g. 3.5 seconds -> -3.5 seconds
*/
func invert() -> CMTime {
func inverted() -> CMTime {
return CMTime(value: value * -1, timescale: timescale)
}
}
2 changes: 1 addition & 1 deletion package/ios/Core/Recording/Track.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Track {
var buffer = originalBuffer
let pauseOffset = timeline.totalPauseDuration
if pauseOffset.seconds > 0 {
buffer = try originalBuffer.copyWithTimestampOffset(pauseOffset.invert())
buffer = try originalBuffer.copyWithTimestampOffset(pauseOffset.inverted())
}
let timestamp = CMSampleBufferGetPresentationTimeStamp(buffer)

Expand Down

0 comments on commit aa12d66

Please sign in to comment.