Skip to content

Commit

Permalink
Use the correct local file cache key for AVAsset data provider
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 27, 2023
1 parent 66a7ff7 commit d2fe2c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/General/ImageSource/AVAssetImageDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public struct AVAssetImageDataProvider: ImageDataProvider {
public let time: CMTime

private var internalKey: String {
return (assetImageGenerator.asset as? AVURLAsset)?.url.absoluteString ?? UUID().uuidString
guard let url = (assetImageGenerator.asset as? AVURLAsset)?.url else {
return UUID().uuidString
}
return url.cacheKey
}

/// The cache key used by `self`.
Expand Down

0 comments on commit d2fe2c0

Please sign in to comment.