[FFmpeg-cvslog] avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

wm4 git at videolan.org
Thu Mar 2 11:32:38 EET 2017


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Fri Feb 24 10:48:13 2017 +0100| [f07492e7fb6601948649ea09a25a493b3da0b75b] | committer: wm4

avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

Makes sure the output can be mapped as OpenGL texture.
This is what at least video players normally want.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f07492e7fb6601948649ea09a25a493b3da0b75b
---

 libavcodec/videotoolbox.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 2ebe60f..824f2d8 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);



More information about the ffmpeg-cvslog mailing list