From 706c63c64bd438b0fd0f0ab6bc22c9a166812c39 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Wed, 26 Jul 2023 16:40:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E9=80=9A=E8=BF=87setServerCo?= =?UTF-8?q?nfig=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9ffmpeg.bin=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/FFmpegSource.h | 1 + server/WebApi.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/server/FFmpegSource.h b/server/FFmpegSource.h index 68e3c440..8efb7ced 100644 --- a/server/FFmpegSource.h +++ b/server/FFmpegSource.h @@ -20,6 +20,7 @@ namespace FFmpeg { extern const std::string kSnap; + extern const std::string kBin; } class FFmpegSnap { diff --git a/server/WebApi.cpp b/server/WebApi.cpp index fe56d404..04d69246 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -657,6 +657,10 @@ void installWebApi() { continue; #endif } + if (pr.first == FFmpeg::kBin) { + WarnL << "Configuration named " << FFmpeg::kBin << " is not allowed to be set by setServerConfig api."; + continue; + } if (ini[pr.first] == pr.second) { continue; }