完善GB28181推流

This commit is contained in:
xiongziliang
2020-07-08 09:36:10 +08:00
parent 477f99b756
commit 248b2d5cb9
6 changed files with 74 additions and 21 deletions

View File

@@ -38,7 +38,6 @@ static bool loadFile(const char *path){
uint16_t len;
char rtp[2 * 1024];
struct sockaddr addr = {0};
string stream_id;
while (true) {
if (2 != fread(&len, 1, 2, fp)) {
WarnL;
@@ -56,7 +55,7 @@ static bool loadFile(const char *path){
}
uint32_t timeStamp;
RtpSelector::Instance().inputRtp(nullptr, stream_id, rtp, len, &addr, &timeStamp);
RtpSelector::Instance().inputRtp(nullptr, rtp, len, &addr, &timeStamp);
if(timeStamp_last){
auto diff = timeStamp - timeStamp_last;
if(diff > 0 && diff < 500){