From 66b8a46b92af00e6028e86c2acb747dbff534e6f Mon Sep 17 00:00:00 2001 From: llyyr Date: Wed, 10 Jun 2026 22:56:39 +0530 Subject: [PATCH 1/2] vulkan/context: guard for null --vulkan-device param Fixes: https://github.com/mpv-player/mpv/issues/18106 --- video/out/vulkan/context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c index 55584a07f9633..d062ea8028594 100644 --- a/video/out/vulkan/context.c +++ b/video/out/vulkan/context.c @@ -63,6 +63,11 @@ static inline OPT_STRING_VALIDATE_FUNC(vk_validate_dev) goto done; struct bstr param = bstr0(*value); + if (!param.len) { + mp_err(log, "No Vulkan device specified.\n"); + ret = M_OPT_INVALID; + goto done; + } bool help = bstr_equals0(param, "help"); if (help) mp_info(log, "Available vulkan devices:\n"); From 69b8d4209fd3b46b7fb4826db734bc85f0da8e79 Mon Sep 17 00:00:00 2001 From: llyyr Date: Wed, 10 Jun 2026 22:57:26 +0530 Subject: [PATCH 2/2] af_scaletempo: avoid memcpy with disabled overlap Overlap can be disabled with overlap=0 or very small stride values which cause calculated overlap size to truncate down to 0. Fixes: https://github.com/mpv-player/mpv/issues/18107 --- audio/filter/af_scaletempo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index 060a5b08a902c..f37e9b7d5a5ef 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -389,9 +389,10 @@ static void af_scaletempo_process(struct mp_filter *f) out_offset += s->bytes_stride; // input stride - memcpy(s->buf_overlap, - s->buf_queue + bytes_off + s->bytes_stride, - s->bytes_overlap); + if (s->buf_overlap && s->bytes_overlap) + memcpy(s->buf_overlap, + s->buf_queue + bytes_off + s->bytes_stride, + s->bytes_overlap); tf = s->frames_stride_scaled + s->frames_stride_error; ti = (int)tf; s->frames_stride_error = tf - ti;