[vlc-devel] [PATCH] videotoolbox: set iosurface property

Thomas Guillem thomas at gllm.fr
Fri Dec 11 13:14:06 CET 2020


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?

> ---
>  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


More information about the vlc-devel mailing list