优化Ehome协议兼容性 (#2063)

This commit is contained in:
samosirl 2022-11-12 21:03:54 +08:00 committed by GitHub
parent b54f50c7c0
commit 6ffbcbfde5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {