Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit a399ef4

Browse files
maickigarrettmoon
authored andcommitted
Some video node improvements
1 parent 085c52b commit a399ef4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

AsyncDisplayKit/ASVideoNode.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ - (void)setAssetURL:(NSURL *)assetURL
472472
ASDN::MutexLocker l(__instanceLock__);
473473

474474
if (ASObjectIsEqual(assetURL, self.assetURL) == NO) {
475-
[self _setAndFetchAsset:[AVURLAsset assetWithURL:assetURL] url:assetURL];
475+
[self locked_setAndFetchAsset:[AVURLAsset assetWithURL:assetURL] url:assetURL];
476476
}
477477
}
478478

@@ -494,7 +494,7 @@ - (void)setAsset:(AVAsset *)asset
494494
ASDN::MutexLocker l(__instanceLock__);
495495

496496
if (ASAssetIsEqual(asset, _asset) == NO) {
497-
[self _setAndFetchAsset:asset url:nil];
497+
[self locked_setAndFetchAsset:asset url:nil];
498498
}
499499
}
500500

@@ -504,10 +504,10 @@ - (AVAsset *)asset
504504
return _asset;
505505
}
506506

507-
- (void)_setAndFetchAsset:(AVAsset *)asset url:(NSURL *)assetURL
507+
- (void)locked_setAndFetchAsset:(AVAsset *)asset url:(NSURL *)assetURL
508508
{
509-
[self setVideoPlaceholderImage:nil];
510509
[self didExitPreloadState];
510+
self.videoPlaceholderImage = nil;
511511
_asset = asset;
512512
_assetURL = assetURL;
513513
[self setNeedsPreload];

0 commit comments

Comments
 (0)