[vlc-devel] [PATCH] videotoolbox: set iosurface property
Marvin Scholz
epirat07 at gmail.com
Fri Dec 11 14:08:46 CET 2020
On 11 Dec 2020, at 13:14, Thomas Guillem wrote:
> Hello,
>
> On Fri, Dec 11, 2020, at 11:54, Alexandre Janniaux wrote:
>> See https://developer.apple.com/library/archive/qa/qa1781/_index.html
>
> The commit log is a little light. What are you trying to fix? Did it
> work before? Why not anymore?
The commit does mention the relevant Apple documentation about this.
While it worked before, I think we were just lucky. I've checked the
WebKit sources and they do set this too, so it seems we should do the
same.
>
>> ---
>> modules/codec/videotoolbox.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/modules/codec/videotoolbox.c
>> b/modules/codec/videotoolbox.c
>> index 0db6424f98..c09ef37769 100644
>> --- a/modules/codec/videotoolbox.c
>> +++ b/modules/codec/videotoolbox.c
>> @@ -1208,6 +1208,10 @@ static int StartVideoToolbox(decoder_t *p_dec)
>> kCVPixelBufferOpenGLESCompatibilityKey,
>> kCFBooleanTrue);
>> #endif
>> + CFMutableDictionaryRef iosurfaceProperties = cfdict_create(0);
>
> Missin null check.
>
>> + CFDictionarySetValue(destinationPixelBufferAttributes,
>> + kCVPixelBufferIOSurfacePropertiesKey,
>> + iosurfaceProperties);
>>
>> cfdict_set_int32(destinationPixelBufferAttributes,
>> kCVPixelBufferWidthKey,
>> p_dec->fmt_out.video.i_visible_width);
>> @@ -1238,6 +1242,7 @@ static int StartVideoToolbox(decoder_t *p_dec)
>> decoderConfiguration,
>>
>> destinationPixelBufferAttributes,
>> &decoderCallbackRecord,
>> &p_sys->session);
>> + CFRelease(iosurfaceProperties);
>> CFRelease(decoderConfiguration);
>> CFRelease(destinationPixelBufferAttributes);
>>
>> --
>
> Otherwise, LGTM.
>
>> 2.29.2
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list