]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey
authorwm4 <nfxjfg@googlemail.com>
Fri, 24 Feb 2017 09:48:13 +0000 (10:48 +0100)
committerwm4 <nfxjfg@googlemail.com>
Thu, 2 Mar 2017 09:32:21 +0000 (10:32 +0100)
Makes sure the output can be mapped as OpenGL texture.
This is what at least video players normally want.

libavcodec/videotoolbox.c

index 2ebe60fb5c0d0d4c09a0dee78c8070ec74fdeec1..824f2d8e683f6ecef6cb75a8fa6e0dbdc8f4d584 100644 (file)
@@ -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);