Commit f07492e7 authored by wm4's avatar wm4

avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

Makes sure the output can be mapped as OpenGL texture.
This is what at least video players normally want.
parent ade7c1a2
...@@ -477,6 +477,7 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, ...@@ -477,6 +477,7 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width,
CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties); CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties);
CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w); CFDictionarySetValue(buffer_attributes, kCVPixelBufferWidthKey, w);
CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h); CFDictionarySetValue(buffer_attributes, kCVPixelBufferHeightKey, h);
CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue);
CFRelease(io_surface_properties); CFRelease(io_surface_properties);
CFRelease(cv_pix_fmt); CFRelease(cv_pix_fmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment