Commit ebce85de authored by Alexandre Janniaux's avatar Alexandre Janniaux
Browse files

videotoolbox: set iosurface property

The kCVPixelBufferIOSSurfaceProperties is supposed to be mandatory for
baking the buffer with an iosurface.

See https://developer.apple.com/library/archive/qa/qa1781/_index.html
parent 8f861692
Pipeline #61369 failed with stage
in 49 minutes and 14 seconds
......@@ -1205,6 +1205,16 @@ static int StartVideoToolbox(decoder_t *p_dec)
kCVPixelBufferOpenGLESCompatibilityKey,
kCFBooleanTrue);
#endif
CFMutableDictionaryRef iosurfaceProperties = cfdict_create(0);
if (iosurfaceProperties == NULL)
{
CFRelease(destinationPixelBufferAttributes);
CFRelease(decoderConfiguration);
return VLC_ENOMEM;
}
CFDictionarySetValue(destinationPixelBufferAttributes,
kCVPixelBufferIOSurfacePropertiesKey,
iosurfaceProperties);
cfdict_set_int32(destinationPixelBufferAttributes,
kCVPixelBufferWidthKey, p_dec->fmt_out.video.i_visible_width);
......@@ -1235,6 +1245,7 @@ static int StartVideoToolbox(decoder_t *p_dec)
decoderConfiguration,
destinationPixelBufferAttributes,
&decoderCallbackRecord, &p_sys->session);
CFRelease(iosurfaceProperties);
CFRelease(decoderConfiguration);
CFRelease(destinationPixelBufferAttributes);
......
Supports Markdown
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