Browse Source

avcodec/videotoolbox: set kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey

Makes sure the output can be mapped as OpenGL texture.
This is what at least video players normally want.
tags/n3.3
wm4 8 years ago
parent
commit
f07492e7fb
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/videotoolbox.c

+ 1
- 0
libavcodec/videotoolbox.c View File

@@ -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);


Loading…
Cancel
Save