mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-24 03:30:52 +08:00
Compare commits
4 Commits
ea96d70f06
...
bdaadfc879
Author | SHA1 | Date | |
---|---|---|---|
|
bdaadfc879 | ||
|
af6d265018 | ||
|
eb8e39d897 | ||
|
6729257eab |
@ -346,7 +346,7 @@ public:
|
||||
return it->second;
|
||||
}
|
||||
|
||||
void for_each(std::function<void(const std::string&, const Pointer&)> cb) {
|
||||
void for_each(const std::function<void(const std::string&, const Pointer&)>& cb) {
|
||||
std::lock_guard<std::recursive_mutex> lck(_mtx);
|
||||
auto it = _map.begin();
|
||||
while (it != _map.end()) {
|
||||
|
@ -126,7 +126,7 @@ bool MP4Recorder::inputFrame(const Frame::Ptr &frame) {
|
||||
if (_last_dts == 0 || _last_dts > frame->dts()) {
|
||||
// b帧情况下dts时间戳可能回退 [AUTO-TRANSLATED:1de38f77]
|
||||
// In the case of b-frames, the dts timestamp may regress
|
||||
_last_dts = MAX(frame->dts(), _last_dts);
|
||||
_last_dts = MIN(frame->dts(), _last_dts);
|
||||
}
|
||||
auto duration = 5u; // 默认至少一帧5ms
|
||||
if (frame->dts() > 0 && frame->dts() > _last_dts) {
|
||||
|
@ -296,10 +296,12 @@ void RtpServer::updateSSRC(uint32_t ssrc) {
|
||||
}
|
||||
|
||||
uint32_t RtpServer::getSSRC() const {
|
||||
if (_ssrc)
|
||||
if (_ssrc) {
|
||||
return *_ssrc;
|
||||
else if (_tcp_server)
|
||||
}
|
||||
if (_tcp_server) {
|
||||
return (*_tcp_server)[RtpSession::kSSRC];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user