vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Wed Aug 15 09:49:33 
2018 +0200| [d1801fcbc57a617b9825bd00519727715525e4e6] | committer: Steve Lhomme

es_out: safer static_assert on the max amount of source stereo modes

Thanks Filip.

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

 include/vlc_es.h   | 2 ++
 src/input/es_out.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index ae533d0820..7a14b9271f 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -244,6 +244,8 @@ typedef enum video_multiview_mode_t
 
     /* Checkerboard pattern with left eye first. */
     MULTIVIEW_STEREO_CHECKERBOARD,
+
+#define MULTIVIEW_STEREO_MAX  MULTIVIEW_STEREO_CHECKERBOARD
 } video_multiview_mode_t;
 
 /**
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 960d64a9de..000cad3f97 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -3381,7 +3381,7 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t 
*es, const es_format_t *
                [MULTIVIEW_STEREO_FRAME] =N_("Frame Sequential"),
                [MULTIVIEW_STEREO_CHECKERBOARD] = N_("Checkboard"),
            };
-           static_assert(ARRAY_SIZE(c_multiview_names) == 
MULTIVIEW_STEREO_CHECKERBOARD+1,
+           static_assert(ARRAY_SIZE(c_multiview_names) == 
MULTIVIEW_STEREO_MAX+1,
                          "Multiview format table mismatch");
            info_category_AddInfo( p_cat, _("Stereo Mode"), "%s",
                vlc_gettext(c_multiview_names[fmt->video.multiview_mode]) );

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to