jsonwang vor 3 Jahren
Ursprung
Commit
865fb2d0e4

+ 4 - 5
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -1166,8 +1166,7 @@ extension PQStuckPointEditerController {
                     } else if model == .createStickersModelOnlyMusic || model == .createStickersModelSpeed { // 仅音乐 和 快慢速卡点
                         BFLog(message: "stuckPoints count is \(finallyStuckPoints.count)")
 
-                        // 一共裁剪的段数
-//                        var totalClipNum: Int = 0
+ 
                         for sticker in section.sectionTimeline!.visionTrack!.getEnableVisionTrackMaterials() {
                             if sticker.type == StickerType.VIDEO.rawValue {
                                 let asset: AVURLAsset = AVURLAsset(url: URL(fileURLWithPath: documensDirectory + sticker.locationPath), options: nil)
@@ -1479,10 +1478,10 @@ extension PQStuckPointEditerController {
 
                                 let lastPointIndex = (sticker.clipCount % stuckPointsTemp.count)
                                 // 两个卡点
-                                let a: Float = stuckPointsTemp[lastPointIndex ?? 0]
+                                let a: Float = stuckPointsTemp[lastPointIndex]
                                 var b: Float = 0.0
-                                if (lastPointIndex ?? 0) + 1 < stuckPointsTemp.count {
-                                    b = stuckPointsTemp[(lastPointIndex ?? 0) + 1]
+                                if lastPointIndex + 1 < stuckPointsTemp.count {
+                                    b = stuckPointsTemp[lastPointIndex + 1]
                                     let pointDuration = b - a
                                     // 要适应到卡点内要使用的C速度
                                     let needSpeed = lastAssetDuration / pointDuration