mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
代码优化
This commit is contained in:
parent
0548256c30
commit
ebc1ee2c6e
@ -148,7 +148,6 @@ static inline void addHttpListener(){
|
||||
NoticeCenter::Instance().addListener(nullptr, Broadcast::kBroadcastHttpRequest, [](BroadcastHttpRequestArgs) {
|
||||
auto it = s_map_api.find(parser.Url());
|
||||
if (it == s_map_api.end()) {
|
||||
consumed = false;
|
||||
return;
|
||||
}
|
||||
//该api已被消费
|
||||
|
@ -58,7 +58,7 @@ static bool loadFile(const char *path){
|
||||
RtpSelector::Instance().inputRtp(nullptr,rtp,len, &addr,&timeStamp);
|
||||
if(timeStamp_last){
|
||||
auto diff = timeStamp - timeStamp_last;
|
||||
if(diff > 0){
|
||||
if(diff > 0 && diff < 500){
|
||||
usleep(diff * 1000);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user