[vlc-commits] [Git][videolan/vlc][master] clean empty initializers in C code

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jan 27 15:29:06 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2a82ce9c by Steve Lhomme at 2023-01-27T15:06:50+00:00
clean empty initializers in C code

MSVC doesn't support it.

- - - - -


5 changed files:

- modules/codec/hxxx_helper.c
- modules/hw/d3d11/d3d11_surface.c
- modules/hw/d3d9/dxa9.c
- modules/video_output/vgl.c
- src/playlist/test.c


Changes:

=====================================
modules/codec/hxxx_helper.c
=====================================
@@ -722,7 +722,7 @@ h264_helper_get_avcc_config(const struct hxxx_helper *hh)
 static block_t *
 hevc_helper_get_hvcc_config(const struct hxxx_helper *hh)
 {
-    struct hevc_dcr_params params = {};
+    struct hevc_dcr_params params = { .i_vps_count = 0 };
     const struct hxxx_helper_nal *p_nal;
 
     HELPER_FOREACH_NAL(p_nal, hh->hevc.vps_list, hh->hevc.i_vps_count,


=====================================
modules/hw/d3d11/d3d11_surface.c
=====================================
@@ -635,7 +635,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 = { .p_sys = NULL };
     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.");


=====================================
modules/hw/d3d9/dxa9.c
=====================================
@@ -351,7 +351,7 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t *p_filter)
     video_format_Copy(&fmt_staging, &p_filter->fmt_out.video);
     fmt_staging.i_chroma = format;
 
-    picture_resource_t dummy_res = {};
+    picture_resource_t dummy_res = { .p_sys = NULL };
     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.");


=====================================
modules/video_output/vgl.c
=====================================
@@ -146,7 +146,7 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
 
     if( sys->setupCb )
     {
-        libvlc_video_setup_device_cfg_t setup_cfg = {};
+        libvlc_video_setup_device_cfg_t setup_cfg = { .hardware_decoding = false };
         libvlc_video_setup_device_info_t configured_cfg;
         if( !sys->setupCb(&sys->opaque, &setup_cfg, &configured_cfg) )
         {


=====================================
src/playlist/test.c
=====================================
@@ -2066,7 +2066,7 @@ test_random(void)
     /* in random order, previous uses the history of randomly selected items */
     assert(!vlc_playlist_HasPrev(playlist));
 
-    bool selected[5] = {};
+    bool selected[5] = { false, false, false, false, false };
     for (int i = 0; i < 5; ++i)
     {
         assert(vlc_playlist_HasNext(playlist));



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2a82ce9cfa889dd7059f7aee4954c29452dfbb91

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2a82ce9cfa889dd7059f7aee4954c29452dfbb91
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list