From 585f7c3a3a8f43cb17684d6113fefa7e9e750a22 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sat, 23 Sep 2023 20:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dffmpeg=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=9B=AE=E5=BD=95=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 每次调用addFFmpegSource/getSnap接口时,都可能导致篡改全局配置变量 --- server/Process.cpp | 2 +- server/Process.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Process.cpp b/server/Process.cpp index 7ddebb08..140282d9 100644 --- a/server/Process.cpp +++ b/server/Process.cpp @@ -108,7 +108,7 @@ static int cloneFunc(void *ptr) { #endif -void Process::run(const string &cmd, string &log_file) { +void Process::run(const string &cmd, string log_file) { kill(2000); #ifdef _WIN32 STARTUPINFO si = { 0 }; diff --git a/server/Process.h b/server/Process.h index d514edb5..06f55345 100644 --- a/server/Process.h +++ b/server/Process.h @@ -26,7 +26,7 @@ class Process { public: Process(); ~Process(); - void run(const std::string &cmd, std::string &log_file); + void run(const std::string &cmd, std::string log_file); void kill(int max_delay,bool force = false); bool wait(bool block = true); int exit_code();