summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-01-14 22:37:10 +0000
committerDudemanguy <random342@airmail.cc>2023-01-16 19:25:54 +0000
commitf66c5404f49806e7ff1f65a8c00145976475188e (patch)
treeb025d5f6bfd9521b6e1da7ead2b18cd1489fc84a /video/out
parent98c2fa095d7fdf4ec8cc957466cadd04f0eacea4 (diff)
downloadmpv-f66c5404f49806e7ff1f65a8c00145976475188e.tar.bz2
mpv-f66c5404f49806e7ff1f65a8c00145976475188e.tar.xz
vo: remove trailing NULL element from driver array
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index cf806b2244..9abd6ceab3 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -121,7 +121,6 @@ const struct vo_driver *const video_out_drivers[] =
#endif
&video_out_kitty,
&video_out_lavc,
- NULL
};
struct vo_internal {
@@ -189,7 +188,7 @@ static void *vo_thread(void *ptr);
static bool get_desc(struct m_obj_desc *dst, int index)
{
- if (index >= MP_ARRAY_SIZE(video_out_drivers) - 1)
+ if (index >= MP_ARRAY_SIZE(video_out_drivers))
return false;
const struct vo_driver *vo = video_out_drivers[index];
*dst = (struct m_obj_desc) {
@@ -371,7 +370,7 @@ struct vo *init_best_video_out(struct mpv_global *global, struct vo_extra *ex)
}
autoprobe:
// now try the rest...
- for (int i = 0; video_out_drivers[i]; i++) {
+ for (int i = 0; i < MP_ARRAY_SIZE(video_out_drivers); i++) {
const struct vo_driver *driver = video_out_drivers[i];
if (driver == &video_out_null)
break;