mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-21 08:22:21 +08:00
1、根据PS获取时间戳
2、修复rtp代理可能花屏的问题
This commit is contained in:
@@ -71,19 +71,14 @@ static bool loadFile(const char *path){
|
||||
}
|
||||
|
||||
uint32_t timeStamp;
|
||||
memcpy(&timeStamp, rtp + 4, 4);
|
||||
timeStamp = ntohl(timeStamp);
|
||||
timeStamp /= 90;
|
||||
|
||||
RtpSelector::Instance().inputRtp(rtp,len, &addr,&timeStamp);
|
||||
if(timeStamp_last){
|
||||
auto diff = timeStamp - timeStamp_last;
|
||||
if(diff > 0){
|
||||
usleep(diff * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
timeStamp_last = timeStamp;
|
||||
RtpSelector::Instance().inputRtp(rtp,len, &addr);
|
||||
}
|
||||
fclose(fp);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user