summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolbox.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-02-24 10:48:13 +0100
committerwm4 <nfxjfg@googlemail.com>2017-03-02 10:32:21 +0100
commitf07492e7fb6601948649ea09a25a493b3da0b75b (patch)
tree052351638778031f7e58d273993152e87e1ab221 /libavcodec/videotoolbox.c
parentade7c1a2326e2bb9be5e60a48b9968eb1d16bfaf (diff)
avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey
Makes sure the output can be mapped as OpenGL texture. This is what at least video players normally want.
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r--libavcodec/videotoolbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 2ebe60fb5c..824f2d8e68 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -477,6 +477,7 @@ 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);
+ CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue);
CFRelease(io_surface_properties);
CFRelease(cv_pix_fmt);