[vlc-devel] [PATCH 2/2] dvdnav: use designated initializer for callback structure
Alexandre Janniaux
ajanni at videolabs.io
Mon Mar 15 17:15:36 UTC 2021
So that we don't give an uninitialized field if the structure expands in
dvdnav.
---
modules/access/dvdnav.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 29170ae832..d673a7348f 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -422,8 +422,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )
/* Open dvdnav */
psz_path = ToLocale( psz_file );
#if DVDNAV_VERSION >= 60100
- dvdnav_logger_cb cbs;
- cbs.pf_log = DvdNavLog;
+ dvdnav_logger_cb cbs = { .pf_log = DvdNavLog };
if( dvdnav_open2( &p_dvdnav, p_demux, &cbs, psz_path ) != DVDNAV_STATUS_OK )
#else
if( dvdnav_open( &p_dvdnav, psz_path ) != DVDNAV_STATUS_OK )
--
2.30.2
More information about the vlc-devel
mailing list