Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwang-bin <wbsecg1@gmail.com>2017-03-03 13:10:54 +0300
committerwm4 <nfxjfg@googlemail.com>2017-03-06 12:54:02 +0300
commit3267e1703b32e83bce1329676fd007cc66a592c7 (patch)
tree954bd38ad9a37f08487149e1fe45478b4f5ef554 /libavcodec/videotoolbox.c
parent035e932d7c039030bd8142bf2f99cbbd1d3e92cf (diff)
avcodec/videotoolbox: set kCVPixelBufferOpenGLESCompatibilityKey for iOS
kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey is not available in iOS
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c5
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);