Browse Source

读取音频 AVURLAsset 时 不设置 参数 AVURLAssetPreferPreciseDurationAndTimingKey

jsonwang 3 years ago
parent
commit
e4e30f7470

+ 1 - 1
BFFramework/Classes/PQGPUImage/Source/iOS/MovieInput.swift

@@ -84,7 +84,7 @@ public class MovieInput: ImageSource {
     }
 
     public convenience init(url: URL, playAtActualSpeed: Bool = false, loop: Bool = false, audioSettings: [String: Any]? = nil) throws {
-        let inputAsset = AVURLAsset(url: url, options: avAssertOptions)
+        let inputAsset = AVURLAsset(url: url, options: nil)
         try self.init(asset: inputAsset, videoComposition: nil, playAtActualSpeed: playAtActualSpeed, loop: loop, audioSettings: audioSettings)
     }
 

+ 1 - 1
BFFramework/Classes/PQGPUImage/akfilters/PQMoveInput.swift

@@ -165,7 +165,7 @@ public class PQMoveInput: ImageSource {
 
     // 初始化方法
     public convenience init(url: URL, playAtActualSpeed: Bool = false, loop: Bool = false, audioSettings: [String: Any]? = nil) throws {
-        let inputAsset = AVURLAsset(url: url, options: avAssertOptions)
+        let inputAsset = AVURLAsset(url: url, options: nil)
         try self.init(asset: inputAsset, videoComposition: nil, audioMix: nil, playAtActualSpeed: playAtActualSpeed, loop: loop, audioSettings: audioSettings)
 
       

+ 1 - 1
BFFramework/Classes/PQGPUImage/akfilters/Tools/PQCompositionExporter.swift

@@ -204,7 +204,7 @@ public class PQCompositionExporter {
                 BFLog(message: "导出视频完成发通知")
                 DispatchQueue.main.async {
                     if let url = self.tmpExportURL {
-                        self.handleCaption(for: AVURLAsset(url: url, options: avAssertOptions))
+                        self.handleCaption(for: AVURLAsset(url: url, options: nil))
                     } else {
                         self.progressClosure?(0, 0, 1)
                         self.completion?(self.exportURL)