summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-03-14 06:43:22 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-15 23:13:53 -0700
commit4aa1be44c2f2c109a3b7f6a8653a1e2f2290887a (patch)
tree9595a1a93f471aa707371e464e62a2e46a865e57
parent290341c77765ecbd44beedbd50f18f45638b78db (diff)
downloadmpv-4aa1be44c2f2c109a3b7f6a8653a1e2f2290887a.tar.bz2
mpv-4aa1be44c2f2c109a3b7f6a8653a1e2f2290887a.tar.xz
f_hwtransfer: fix a logic error
Jesus Christ, how did I get this wrong, or never verified proper function. This fixes --vf=vdpaupp not working with yuv420p input.
-rw-r--r--filters/f_hwtransfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/filters/f_hwtransfer.c b/filters/f_hwtransfer.c
index 6ffda567ae..b06236df38 100644
--- a/filters/f_hwtransfer.c
+++ b/filters/f_hwtransfer.c
@@ -54,8 +54,8 @@ static bool update_format_decision(struct priv *p, int input_fmt)
return false;
for (int n = 0; n < u->num_fmts; n++) {
- if (u->fmt_upload_index[n] >= index &&
- index < u->fmt_upload_index[n] + u->fmt_upload_num[n])
+ if (index >= u->fmt_upload_index[n] &&
+ index < u->fmt_upload_index[n] + u->fmt_upload_num[n])
{
p->last_input_fmt = input_fmt;
p->last_upload_fmt = u->upload_fmts[index];