summaryrefslogtreecommitdiffstats
path: root/video/out/vo_gpu_next.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-02 18:27:28 -0500
committerDudemanguy <random342@airmail.cc>2023-08-05 14:01:02 +0000
commit59ac302dff06433c5fe46a3d3beeb63df18bea9e (patch)
tree44363c99779784ea66873ef4b707c6f46a386dcf /video/out/vo_gpu_next.c
parent65a95a721ee23c45a7fedef5d2174b3f1ed13b6d (diff)
downloadmpv-59ac302dff06433c5fe46a3d3beeb63df18bea9e.tar.bz2
mpv-59ac302dff06433c5fe46a3d3beeb63df18bea9e.tar.xz
vo_gpu/vo_gpu_next: fix setting an empty dscale
The manual currently says that if dscale is unset, --scale will be applied. However, this only works at init time. If you change the dscale filter to be empty later, vo_gpu will segfault and vo_gpu_next will throw an error and refuse the changes. That's because when the option is unset at runtime, the value becomes "" not NULL and the vo's never accounted for this. Fixes #12031.
Diffstat (limited to 'video/out/vo_gpu_next.c')
-rw-r--r--video/out/vo_gpu_next.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 3fe068c279..6a9d20cbb0 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1542,7 +1542,7 @@ static const struct pl_filter_config *map_scaler(struct priv *p,
const struct gl_video_opts *opts = p->opts_cache->opts;
const struct scaler_config *cfg = &opts->scaler[unit];
- if (unit == SCALER_DSCALE && !cfg->kernel.name)
+ if (unit == SCALER_DSCALE && (!cfg->kernel.name || !strcmp(cfg->kernel.name, "")))
cfg = &opts->scaler[SCALER_SCALE];
for (int i = 0; fixed_presets[i].name; i++) {