summaryrefslogtreecommitdiffstats
path: root/video/out/hwdec
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-06-06 23:13:20 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-06-07 21:12:38 +0200
commitdea176a7bf565289ffae5c6e18d1a8bcc9afc6fc (patch)
treeb36e5cad5b00f93c17e5b382a29c99d9378dee30 /video/out/hwdec
parentb2a4c0ce9172c30449b31f86fa9a1b94b97f8012 (diff)
downloadmpv-dea176a7bf565289ffae5c6e18d1a8bcc9afc6fc.tar.bz2
mpv-dea176a7bf565289ffae5c6e18d1a8bcc9afc6fc.tar.xz
hwdec_vaapi: suppress comparision warning
comparison of unsigned expression in '< 0' is always false
Diffstat (limited to 'video/out/hwdec')
-rw-r--r--video/out/hwdec/hwdec_vaapi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c
index 6080ce9e05..504880ad4e 100644
--- a/video/out/hwdec/hwdec_vaapi.c
+++ b/video/out/hwdec/hwdec_vaapi.c
@@ -84,16 +84,18 @@ static const struct va_create_native create_native_cbs[] = {
#if HAVE_VAAPI_DRM
{"drm", create_drm_va_display},
#endif
+ {0}
};
static VADisplay *create_native_va_display(struct ra *ra, struct mp_log *log)
{
- for (int n = 0; n < MP_ARRAY_SIZE(create_native_cbs); n++) {
- const struct va_create_native *disp = &create_native_cbs[n];
+ const struct va_create_native *disp = create_native_cbs;
+ while (disp->name) {
mp_verbose(log, "Trying to open a %s VA display...\n", disp->name);
VADisplay *display = disp->create(ra);
if (display)
return display;
+ disp++;
}
return NULL;
}