[vlc-commits] dvdnav: use designated initializer for callback structure

Alexandre Janniaux git at videolan.org
Fri Mar 19 14:26:32 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Mon Mar 15 18:15:36 2021 +0100| [69742a6224b28dfdad6bd9c73e2e282f1503681a] | committer: Alexandre Janniaux

dvdnav: use designated initializer for callback structure

So that we don't give an uninitialized field if the structure expands in
dvdnav.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69742a6224b28dfdad6bd9c73e2e282f1503681a
---

 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 )



More information about the vlc-commits mailing list