From f33b89ca2994fec5760a0d15a4916799d3e833fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 15 Oct 2024 16:26:52 +0200 Subject: [PATCH] osdep/subprocess: log subprocess error as verbose if killed by us Fixes: https://github.com/po5/thumbfast/issues/133#issuecomment-2413618437 --- osdep/subprocess.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osdep/subprocess.c b/osdep/subprocess.c index b994cd80de..fdce7dff94 100644 --- a/osdep/subprocess.c +++ b/osdep/subprocess.c @@ -44,6 +44,8 @@ void mp_subprocess(struct mp_log *log, mp_verbose(log, ", %s", *arg++); mp_verbose(log, "]\n"); mp_subprocess2(opts, res); - if (res->error < 0) - mp_err(log, "Subprocess failed: %s\n", mp_subprocess_err_str(res->error)); + if (res->error < 0) { + int lev = res->error == MP_SUBPROCESS_EKILLED_BY_US ? MSGL_V : MSGL_ERR; + mp_msg(log, lev, "Subprocess failed: %s\n", mp_subprocess_err_str(res->error)); + } }