[vlc-commits] vt_utils: fix buffers not always backed by an IOSurface
Thomas Guillem
git at videolan.org
Tue Sep 12 17:32:01 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 12 17:31:26 2017 +0200| [6f67eab973463a21d96711ac0454ae276e950d18] | committer: Thomas Guillem
vt_utils: fix buffers not always backed by an IOSurface
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f67eab973463a21d96711ac0454ae276e950d18
---
modules/codec/vt_utils.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 70ee711097..f4561239a3 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -224,7 +224,6 @@ cvpxpool_create(const video_format_t *fmt, unsigned count)
return NULL;
}
-#if !TARGET_OS_IPHONE
CFMutableDictionaryRef io_dict = cfdict_create(0);
if (unlikely(io_dict == NULL))
{
@@ -235,10 +234,6 @@ cvpxpool_create(const video_format_t *fmt, unsigned count)
CFDictionarySetValue(cvpx_attrs_dict,
kCVPixelBufferIOSurfacePropertiesKey, io_dict);
CFRelease(io_dict);
-#else
- CFDictionarySetValue(cvpx_attrs_dict,
- kCVPixelBufferOpenGLESCompatibilityKey, kCFBooleanTrue);
-#endif
cfdict_set_int32(cvpx_attrs_dict, kCVPixelBufferBytesPerRowAlignmentKey,
fmt->i_width);
@@ -246,6 +241,8 @@ cvpxpool_create(const video_format_t *fmt, unsigned count)
cvpx_format);
cfdict_set_int32(cvpx_attrs_dict, kCVPixelBufferWidthKey, fmt->i_width);
cfdict_set_int32(cvpx_attrs_dict, kCVPixelBufferHeightKey, fmt->i_height);
+ /* Required by CIFilter to render IOSurface */
+ cfdict_set_int32(cvpx_attrs_dict, kCVPixelBufferBytesPerRowAlignmentKey, 16);
cfdict_set_int32(pool_dict, kCVPixelBufferPoolMinimumBufferCountKey, count);
cfdict_set_int32(pool_dict, kCVPixelBufferPoolMaximumBufferAgeKey, 0);
More information about the vlc-commits
mailing list