only apply filter if filter is set
This commit is contained in:
parent
e1c1eb6dc8
commit
97ac68745b
@ -1274,16 +1274,12 @@ static int const RCTVideoUnset = -1;
|
|||||||
|
|
||||||
CIFilter *filter = [CIFilter filterWithName:filterName];
|
CIFilter *filter = [CIFilter filterWithName:filterName];
|
||||||
|
|
||||||
|
if (filter != nil) {
|
||||||
|
|
||||||
_playerItem.videoComposition = [AVVideoComposition
|
_playerItem.videoComposition = [AVVideoComposition
|
||||||
videoCompositionWithAsset:asset
|
videoCompositionWithAsset:asset
|
||||||
applyingCIFiltersWithHandler:^(AVAsynchronousCIImageFilteringRequest *_Nonnull request) {
|
applyingCIFiltersWithHandler:^(AVAsynchronousCIImageFilteringRequest *_Nonnull request) {
|
||||||
|
|
||||||
if (filter == nil) {
|
|
||||||
|
|
||||||
[request finishWithImage:request.sourceImage context:nil];
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
CIImage *image = request.sourceImage.imageByClampingToExtent;
|
CIImage *image = request.sourceImage.imageByClampingToExtent;
|
||||||
|
|
||||||
[filter setValue:image forKey:kCIInputImageKey];
|
[filter setValue:image forKey:kCIInputImageKey];
|
||||||
@ -1292,9 +1288,9 @@ static int const RCTVideoUnset = -1;
|
|||||||
|
|
||||||
[request finishWithImage:output context:nil];
|
[request finishWithImage:output context:nil];
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user