fix: metal renderer no image on ios15.2 simulator
This commit is contained in:
1 parent
25ca131da1
commit
ea1a2f3cd0
1 file changed
+7
-2
@@ -200,6 +200,12 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
|
|||||||
- (void)setupDecompressionSession {
|
- (void)setupDecompressionSession {
|
||||||
#if TARGET_OS_SIMULATOR
|
#if TARGET_OS_SIMULATOR
|
||||||
NSNumber *pixelFormat = @(kCVPixelFormatType_32BGRA);
|
NSNumber *pixelFormat = @(kCVPixelFormatType_32BGRA);
|
||||||
|
NSMutableDictionary *destinationPixelBufferAttributes = [@{
|
||||||
|
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat,
|
||||||
|
(id)kCVPixelBufferIOSurfacePropertiesKey : @{
|
||||||
|
(id)kIOSurfaceIsGlobal : @YES
|
||||||
|
},
|
||||||
|
} mutableCopy];
|
||||||
#else
|
#else
|
||||||
NSNumber *pixelFormat = nil;
|
NSNumber *pixelFormat = nil;
|
||||||
if (self->_videoFormat & VIDEO_FORMAT_MASK_YUV444) {
|
if (self->_videoFormat & VIDEO_FORMAT_MASK_YUV444) {
|
||||||
@@ -208,11 +214,10 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
|
|||||||
else {
|
else {
|
||||||
pixelFormat = @(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange);
|
pixelFormat = @(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NSMutableDictionary *destinationPixelBufferAttributes = [@{
|
NSMutableDictionary *destinationPixelBufferAttributes = [@{
|
||||||
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat
|
(id)kCVPixelBufferPixelFormatTypeKey : pixelFormat
|
||||||
} mutableCopy];
|
} mutableCopy];
|
||||||
|
#endif
|
||||||
|
|
||||||
if (@available(iOS 17.0, tvOS 17.0, *)) {
|
if (@available(iOS 17.0, tvOS 17.0, *)) {
|
||||||
destinationPixelBufferAttributes[(id)kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder] = @YES;
|
destinationPixelBufferAttributes[(id)kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder] = @YES;
|
||||||
|
|||||||
Reference in new issue
Block a user