修改文件编码各位为UFT-8 BOM

This commit is contained in:
renlu 2022-12-02 11:01:15 +08:00
parent 429a6ff0a1
commit 7801467e36
3 changed files with 36 additions and 37 deletions

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* *
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
@ -1485,7 +1485,6 @@ void installWebApi() {
auto scan_path = File::absolutePath(MD5(allArgs["url"]).hexdigest(), snap_root) + "/"; auto scan_path = File::absolutePath(MD5(allArgs["url"]).hexdigest(), snap_root) + "/";
string new_snap = StrPrinter << scan_path << time(NULL) << ".jpeg"; string new_snap = StrPrinter << scan_path << time(NULL) << ".jpeg";
if (expire_sec != 0){
File::scanDir(scan_path, [&](const string &path, bool isDir) { File::scanDir(scan_path, [&](const string &path, bool isDir) {
if (isDir || !end_with(path, ".jpeg")) { if (isDir || !end_with(path, ".jpeg")) {
//忽略文件夹或其他类型的文件 //忽略文件夹或其他类型的文件
@ -1522,7 +1521,7 @@ void installWebApi() {
fclose(file); fclose(file);
} }
} }
}
//启动FFmpeg进程开始截图生成临时文件截图成功后替换为正式文件 //启动FFmpeg进程开始截图生成临时文件截图成功后替换为正式文件
auto new_snap_tmp = new_snap + ".tmp"; auto new_snap_tmp = new_snap + ".tmp";
FFmpegSnap::makeSnap(allArgs["url"], new_snap_tmp, allArgs["timeout_sec"], [invoker, allArgs, new_snap, new_snap_tmp](bool success, const string &err_msg) { FFmpegSnap::makeSnap(allArgs["url"], new_snap_tmp, allArgs["timeout_sec"], [invoker, allArgs, new_snap, new_snap_tmp](bool success, const string &err_msg) {

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* *
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).

View File

@ -1,4 +1,4 @@
/* /*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
* *
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).