mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-26 11:52:22 +08:00
Avoid build warnings in the main code
This commit is contained in:
@@ -113,7 +113,7 @@ ProtocolOption::ProtocolOption() {
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct MediaSourceNull : public MediaSource {
|
||||
MediaSourceNull() : MediaSource("schema", MediaTuple{"vhost", "app", "stream"}) {};
|
||||
MediaSourceNull() : MediaSource("schema", MediaTuple{"vhost", "app", "stream", ""}) {};
|
||||
int readerCount() override { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ MP4Reader::MP4Reader(const std::string &vhost, const std::string &app, const std
|
||||
|
||||
void MP4Reader::setup(const std::string &vhost, const std::string &app, const std::string &stream_id, const std::string &file_path, const ProtocolOption &option, toolkit::EventPoller::Ptr poller) {
|
||||
//读写文件建议放在后台线程
|
||||
auto tuple = MediaTuple{vhost, app, stream_id};
|
||||
auto tuple = MediaTuple{vhost, app, stream_id, ""};
|
||||
_poller = poller ? std::move(poller) : WorkThreadPool::Instance().getPoller();
|
||||
_file_path = file_path;
|
||||
if (_file_path.empty()) {
|
||||
|
||||
@@ -118,7 +118,7 @@ bool MP4Recorder::inputFrame(const Frame::Ptr &frame) {
|
||||
//b帧情况下dts时间戳可能回退
|
||||
_last_dts = MAX(frame->dts(), _last_dts);
|
||||
}
|
||||
auto duration = 5; // 默认至少一帧5ms
|
||||
auto duration = 5u; // 默认至少一帧5ms
|
||||
if (frame->dts() > 0 && frame->dts() > _last_dts) {
|
||||
duration = MAX(duration, frame->dts() - _last_dts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user