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; 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");