mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
修复无法删除mp4录像文件的bug
This commit is contained in:
parent
472d7d1e4f
commit
65c2abb0b5
@ -1590,12 +1590,14 @@ void installWebApi() {
|
|||||||
auto record_path = Recorder::getRecordPath(Recorder::type_mp4, tuple, allArgs["customized_path"]);
|
auto record_path = Recorder::getRecordPath(Recorder::type_mp4, tuple, allArgs["customized_path"]);
|
||||||
auto period = allArgs["period"];
|
auto period = allArgs["period"];
|
||||||
record_path = record_path + period + "/";
|
record_path = record_path + period + "/";
|
||||||
|
|
||||||
|
bool recording = false;
|
||||||
auto name = allArgs["name"];
|
auto name = allArgs["name"];
|
||||||
if (!name.empty()) {
|
if (!name.empty()) {
|
||||||
|
// 删除指定文件
|
||||||
record_path += name;
|
record_path += name;
|
||||||
}
|
} else {
|
||||||
bool recording = false;
|
// 删除文件夹,先判断该流是否正在录制中
|
||||||
{
|
|
||||||
auto src = MediaSource::find(allArgs["vhost"], allArgs["app"], allArgs["stream"]);
|
auto src = MediaSource::find(allArgs["vhost"], allArgs["app"], allArgs["stream"]);
|
||||||
if (src && src->isRecording(Recorder::type_mp4)) {
|
if (src && src->isRecording(Recorder::type_mp4)) {
|
||||||
recording = true;
|
recording = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user