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:
parent
2704625e3f
commit
f1ba1ef77f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user