Ehome消息头解析优化,解决主码流无法播放问题,第二个及之后通道无法播放问题

This commit is contained in:
liyanwei 2022-11-01 22:50:32 +08:00
parent 5877d3942e
commit c617e5d8c2
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,11 @@ static bool isEhome(const char *data, size_t len){
if (len < 4) {
return false;
}
return memcmp(data, kEHOME_MAGIC, sizeof(kEHOME_MAGIC) - 1) == 0;
if((data[0] == 0x01) && (data[1] == 0x00) && (data[2] >=0x01)){
return true;
}
return false;
//return memcmp(data, kEHOME_MAGIC, sizeof(kEHOME_MAGIC) - 1) == 0;
}
const char *RtpSplitter::onSearchPacketTail(const char *data, size_t len) {