From f24802d0e43b62dcb32e3ce6fde43d2450c2abc3 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Tue, 9 Jul 2024 04:43:34 +0200 Subject: [PATCH] WebAPI: Fix build if ENABLE_MP4=false (#3699) The class `MP4Reader` is only defined if the macro is ON --- server/WebApi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index b0b9b354..90d63197 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -1949,6 +1949,7 @@ void installWebApi() { }); #endif +#if ENABLE_MP4 api_regist("/index/api/loadMP4File", [](API_ARGS_MAP) { CHECK_SECRET(); CHECK_ARGS("vhost", "app", "stream", "file_path"); @@ -1967,6 +1968,7 @@ void installWebApi() { // sample_ms设置为0,从配置文件加载;file_repeat可以指定,如果配置文件也指定循环解复用,那么强制开启 reader->startReadMP4(0, true, allArgs["file_repeat"]); }); +#endif GET_CONFIG_FUNC(std::set, download_roots, API::kDownloadRoot, [](const string &str) -> std::set { std::set ret;