mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 11:17:09 +08:00
修复ehome推流相关bug: #549
This commit is contained in:
parent
57a11f19dd
commit
a93c57eb59
@ -24,7 +24,7 @@ int64_t RtpSplitter::onRecvHeader(const char *data,uint64_t len){
|
|||||||
data += _offset;
|
data += _offset;
|
||||||
len -= _offset;
|
len -= _offset;
|
||||||
|
|
||||||
if (_offset == kEHOME_OFFSET + 4 && len > 12 && data[12] == '\r') {
|
if (_is_ehome && len > 12 && data[12] == '\r') {
|
||||||
//这是ehome,移除第12个字节
|
//这是ehome,移除第12个字节
|
||||||
memmove((char *) data + 1, data, 12);
|
memmove((char *) data + 1, data, 12);
|
||||||
data += 1;
|
data += 1;
|
||||||
@ -55,6 +55,7 @@ const char *RtpSplitter::onSearchPacketTail(const char *data, uint64_t len) {
|
|||||||
}
|
}
|
||||||
//忽略ehome私有头后是rtsp样式的rtp,多4个字节,
|
//忽略ehome私有头后是rtsp样式的rtp,多4个字节,
|
||||||
_offset = kEHOME_OFFSET + 4;
|
_offset = kEHOME_OFFSET + 4;
|
||||||
|
_is_ehome = true;
|
||||||
//忽略ehome私有头
|
//忽略ehome私有头
|
||||||
return onSearchPacketTail_l(data + kEHOME_OFFSET + 2, len - kEHOME_OFFSET - 2);
|
return onSearchPacketTail_l(data + kEHOME_OFFSET + 2, len - kEHOME_OFFSET - 2);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int _offset = 0;
|
int _offset = 0;
|
||||||
|
bool _is_ehome = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}//namespace mediakit
|
}//namespace mediakit
|
||||||
|
Loading…
Reference in New Issue
Block a user