mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
Some video node improvements
This commit is contained in:
committed by
Garrett Moon
parent
085c52b703
commit
a399ef4acf
@@ -472,7 +472,7 @@ static NSString * const kRate = @"rate";
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
|
||||
if (ASObjectIsEqual(assetURL, self.assetURL) == NO) {
|
||||
[self _setAndFetchAsset:[AVURLAsset assetWithURL:assetURL] url:assetURL];
|
||||
[self locked_setAndFetchAsset:[AVURLAsset assetWithURL:assetURL] url:assetURL];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ static NSString * const kRate = @"rate";
|
||||
ASDN::MutexLocker l(__instanceLock__);
|
||||
|
||||
if (ASAssetIsEqual(asset, _asset) == NO) {
|
||||
[self _setAndFetchAsset:asset url:nil];
|
||||
[self locked_setAndFetchAsset:asset url:nil];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,10 +504,10 @@ static NSString * const kRate = @"rate";
|
||||
return _asset;
|
||||
}
|
||||
|
||||
- (void)_setAndFetchAsset:(AVAsset *)asset url:(NSURL *)assetURL
|
||||
- (void)locked_setAndFetchAsset:(AVAsset *)asset url:(NSURL *)assetURL
|
||||
{
|
||||
[self setVideoPlaceholderImage:nil];
|
||||
[self didExitPreloadState];
|
||||
self.videoPlaceholderImage = nil;
|
||||
_asset = asset;
|
||||
_assetURL = assetURL;
|
||||
[self setNeedsPreload];
|
||||
|
||||
Reference in New Issue
Block a user