From 4aea4246f6dcfef49d71f749816391a8e0185b27 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 6 Feb 2021 23:57:37 +0700 Subject: [PATCH] Minor tweaks --- Gifski.xcodeproj/project.pbxproj | 2 +- Gifski/EditVideoViewController.swift | 4 ++-- Gifski/Utilities.swift | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gifski.xcodeproj/project.pbxproj b/Gifski.xcodeproj/project.pbxproj index ff894501..10c1deaf 100644 --- a/Gifski.xcodeproj/project.pbxproj +++ b/Gifski.xcodeproj/project.pbxproj @@ -811,7 +811,7 @@ repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 7.4.0; + minimumVersion = 7.5.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Gifski/EditVideoViewController.swift b/Gifski/EditVideoViewController.swift index ef26b9c4..053ab42b 100644 --- a/Gifski/EditVideoViewController.swift +++ b/Gifski/EditVideoViewController.swift @@ -484,8 +484,8 @@ final class EditVideoViewController: NSViewController { private func cancelFileSizeEstimation() { // TODO: Deinit doesn't seem to be called. - self.gifski?.cancel() - self.gifski = nil + gifski?.cancel() + gifski = nil if estimatedSizeLabel.stringValue.contains("Calculating") { setEstimatedFileSize(getNaiveEstimate().attributedString) diff --git a/Gifski/Utilities.swift b/Gifski/Utilities.swift index 4c01f626..7781aa14 100644 --- a/Gifski/Utilities.swift +++ b/Gifski/Utilities.swift @@ -613,7 +613,7 @@ extension AVAssetTrack { // swiftlint:disable:next force_cast let formatDescription = rawDescription as! CMFormatDescription - return CMFormatDescriptionGetMediaSubType(formatDescription).toString() + return CMFormatDescriptionGetMediaSubType(formatDescription).fourCharCodeToString() } var codec: AVFormat? { @@ -637,10 +637,10 @@ extension AVAssetTrack { var format = [String]() for description in descriptions { // Get string representation of media type (vide, soun, sbtl, etc.) - let type = CMFormatDescriptionGetMediaType(description).toString() + let type = CMFormatDescriptionGetMediaType(description).fourCharCodeToString() // Get string representation media subtype (avc1, aac, tx3g, etc.) - let subType = CMFormatDescriptionGetMediaSubType(description).toString() + let subType = CMFormatDescriptionGetMediaSubType(description).fourCharCodeToString() format.append("\(type)/\(subType)") } @@ -687,7 +687,7 @@ extension AVAssetTrack { */ extension FourCharCode { /// Create a String representation of a FourCC. - func toString() -> String { + func fourCharCodeToString() -> String { let a_ = self >> 24 let b_ = self >> 16 let c_ = self >> 8 @@ -795,7 +795,7 @@ enum AVFormat: String { } init?(fourCC: FourCharCode) { - self.init(fourCC: fourCC.toString()) + self.init(fourCC: fourCC.fourCharCodeToString()) } var fourCC: String {