Skip to content

Commit

Permalink
修复无法删除mp4录像文件的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
PioLing committed May 15, 2024
1 parent 472d7d1 commit 65c2abb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/WebApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 65c2abb

Please sign in to comment.