修复编译警告

This commit is contained in:
xia-chu
2024-07-21 19:31:17 +08:00
parent 6583e2869a
commit 9463d1291d
9 changed files with 20 additions and 20 deletions

View File

@@ -223,8 +223,8 @@ int main(int argc, char *argv[]) {
option.enable_hls = false;
option.enable_mp4 = false;
option.modify_stamp = (int)ProtocolOption::kModifyStampRelative;
//添加拉流代理
auto tuple = MediaTuple{DEFAULT_VHOST, "app", std::to_string(i)};
//添加拉流代理
auto tuple = MediaTuple { DEFAULT_VHOST, "app", std::to_string(i), "" };
auto proxy = std::make_shared<PlayerProxy>(tuple, option, -1, nullptr, 1);
//开始拉流代理
proxy->play(input_urls[i]);

View File

@@ -148,7 +148,7 @@ int main(int argc, char *argv[]) {
MediaSource::Ptr src = nullptr;
PlayerProxy::Ptr proxy = nullptr;;
auto tuple = MediaTuple{DEFAULT_VHOST, app, stream};
auto tuple = MediaTuple { DEFAULT_VHOST, app, stream, "" };
if (end_with(in_url, ".mp4")) {
// create MediaSource from mp4file
auto reader = std::make_shared<MP4Reader>(tuple, in_url);

View File

@@ -75,7 +75,7 @@ static bool loadFile(const char *path, const EventPoller::Ptr &poller) {
return 0;
}
auto diff = stamp - stamp_last;
auto diff = static_cast<int64_t>(stamp - stamp_last);
if (diff < 0 || diff > 500) {
diff = 1;
}