From 65c2abb0b53997a3fc164ae40d8b0f8ce21c46dd Mon Sep 17 00:00:00 2001 From: admin <964472638@qq.com> Date: Wed, 15 May 2024 11:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E5=88=A0?= =?UTF-8?q?=E9=99=A4mp4=E5=BD=95=E5=83=8F=E6=96=87=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 30a6c559..988b55b5 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -1590,12 +1590,14 @@ void installWebApi() { auto record_path = Recorder::getRecordPath(Recorder::type_mp4, tuple, allArgs["customized_path"]); auto period = allArgs["period"]; record_path = record_path + period + "/"; + + bool recording = false; auto name = allArgs["name"]; if (!name.empty()) { + // 删除指定文件 record_path += name; - } - bool recording = false; - { + } else { + // 删除文件夹,先判断该流是否正在录制中 auto src = MediaSource::find(allArgs["vhost"], allArgs["app"], allArgs["stream"]); if (src && src->isRecording(Recorder::type_mp4)) { recording = true;