Skip to content

Commit b97015b

Browse files
committed
fix iphonesimulator -arch x86_64 build failed
1 parent 59ef4f2 commit b97015b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ijkmedia/ijksdl/metal/FSMetalView.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,11 @@ - (CGImageRef)_snapshotWithSubtitle:(BOOL)drawSub
560560
CGImageRef result = [self.offscreenRendering snapshot:viewport device:self.device commandBuffer:commandBuffer doUploadPicture:^(id<MTLRenderCommandEncoder> _Nonnull renderEncoder) {
561561

562562
if (!attach.videoTextures) {
563-
attach.videoTextures = [[self class] doGenerateTexture:attach.videoPicture textureCache:self.pictureTextureCache device:self.device];
563+
CVMetalTextureCacheRef textureCache = NULL;
564+
#if TARGET_CPU_ARM64
565+
textureCache = self.pictureTextureCache;
566+
#endif
567+
attach.videoTextures = [[self class] doGenerateTexture:attach.videoPicture textureCache:textureCache device:self.device];
564568
}
565569

566570
[self encodePicture:attach

0 commit comments

Comments
 (0)