1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-25 00:53:22 +00:00

vo_x11: fix return value in resize() error paths

Returning -1 in a function with return type bool is the same as
returning true. In the error paths, false should be returned to
indicate that something went wrong.
This commit is contained in:
Rikard Falkeborn 2018-11-16 19:55:09 +01:00 committed by sfan5
parent 2704625e3f
commit f1ba1ef77f

View File

@ -226,7 +226,7 @@ static bool resize(struct vo *vo)
for (int i = 0; i < 2; i++) {
if (!getMyXImage(p, i))
return -1;
return false;
}
const struct fmt_entry *fmte = mp_to_x_fmt;
@ -241,7 +241,7 @@ static bool resize(struct vo *vo)
}
if (!fmte->mpfmt) {
MP_ERR(vo, "X server image format not supported, use another VO.\n");
return -1;
return false;
}
mp_sws_set_from_cmdline(p->sws, vo->global);