[vlc-devel] [PATCH 1/2] d3d11: d3d11_surface: fix zero-initialization

Rémi Denis-Courmont remi at remlab.net
Fri Jul 24 12:06:34 CEST 2020


Le perjantaina 24. heinäkuuta 2020, 12.24.25 EEST Alexandre Janniaux a écrit :
> zero-initialization with = {} is a GNU extension and is only standardly
> available in C++.

AFAIR, this patch will cause a missing initializer warning.

> ---
>  modules/hw/d3d11/d3d11_surface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/hw/d3d11/d3d11_surface.c
> b/modules/hw/d3d11/d3d11_surface.c index 4622436c4ed..cabb1ab9ef7 100644
> --- a/modules/hw/d3d11/d3d11_surface.c
> +++ b/modules/hw/d3d11/d3d11_surface.c
> @@ -614,7 +614,7 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t
> *p_filter, filter_sys_t *p_sy video_format_Copy(&fmt_staging,
> &p_filter->fmt_out.video);
>      fmt_staging.i_chroma = cfg->fourcc;
> 
> -    picture_resource_t dummy_res = {};
> +    picture_resource_t dummy_res = {0};
>      picture_t *p_dst = picture_NewFromResource(&fmt_staging, &dummy_res);
>      if (p_dst == NULL) {
>          msg_Err(p_filter, "Failed to map create the temporary picture.");


-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list