diff options
author | wang-bin <wbsecg1@gmail.com> | 2017-03-03 18:10:54 +0800 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-03-06 10:54:02 +0100 |
commit | 3267e1703b32e83bce1329676fd007cc66a592c7 (patch) | |
tree | 954bd38ad9a37f08487149e1fe45478b4f5ef554 /libavcodec | |
parent | 035e932d7c039030bd8142bf2f99cbbd1d3e92cf (diff) | |
download | ffmpeg-3267e1703b32e83bce1329676fd007cc66a592c7.tar.gz |
avcodec/videotoolbox: set kCVPixelBufferOpenGLESCompatibilityKey for iOS
kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey is not available in
iOS
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/videotoolbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 824f2d8e68..9199b02055 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -31,6 +31,7 @@ #include "bytestream.h" #include "h264dec.h" #include "mpegvideo.h" +#include <TargetConditionals.h> #ifndef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder # define kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder CFSTR("RequireHardwareAcceleratedVideoDecoder") @@ -477,7 +478,11 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties); CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w); CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h); +#if TARGET_OS_IPHONE + CFDictionarySetValue(buffer_attributes, kCVPixelBufferOpenGLESCompatibilityKey, kCFBooleanTrue); +#else CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue); +#endif CFRelease(io_surface_properties); CFRelease(cv_pix_fmt); |