Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
53f09b1c by Niklas Haas at 2022-06-12T18:19:37+00:00
decklink: avoid static struct initializer

Prevents compilation failure when extending this struct in the future, a
feature(tm) unique to C++.

- - - - -


1 changed file:

- modules/video_output/decklink.cpp


Changes:

=====================================
modules/video_output/decklink.cpp
=====================================
@@ -779,9 +779,13 @@ static int ControlVideo(vout_display_t *vd, int query)
     return VLC_EGENERIC;
 }
 
-static const struct vlc_display_operations ops = {
-    CloseVideo, PrepareVideo, NULL, ControlVideo, NULL, NULL,
-};
+static const auto ops = []{
+    struct vlc_display_operations ops {};
+    ops.close = CloseVideo;
+    ops.prepare = PrepareVideo;
+    ops.control = ControlVideo;
+    return ops;
+}();
 
 static int OpenVideo(vout_display_t *vd,
                      video_format_t *fmtp, vlc_video_context *context)



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/53f09b1c6da56aef57baded99876ba3cc7bcd94e

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to