mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
ehome协议推流花屏问题 (#3720)
https://github.com/ZLMediaKit/ZLMediaKit/issues/3710 当前修改方式 只检测一次 由于第一个数据是256字节需要检测两次 ;现在修改方式是检测3次, 如果失败就不是ehome。后续不需要检测
This commit is contained in:
parent
d735aa1797
commit
aad98be5ef
@ -46,7 +46,7 @@ const char *RtpSplitter::onSearchPacketTail(const char *data, size_t len) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ( _is_ehome ) {
|
||||
if (_check_ehome_count) {
|
||||
if (isEhome(data, len)) {
|
||||
//是ehome协议
|
||||
if (len < kEHOME_OFFSET + 4) {
|
||||
@ -59,7 +59,7 @@ const char *RtpSplitter::onSearchPacketTail(const char *data, size_t len) {
|
||||
//忽略ehome私有头
|
||||
return onSearchPacketTail_l(data + kEHOME_OFFSET + 2, len - kEHOME_OFFSET - 2);
|
||||
}
|
||||
_is_ehome = false;
|
||||
_check_ehome_count--;
|
||||
}
|
||||
|
||||
if ( _is_rtsp_interleaved ) {
|
||||
|
@ -31,7 +31,8 @@ protected:
|
||||
const char *onSearchPacketTail_l(const char *data, size_t len);
|
||||
|
||||
private:
|
||||
bool _is_ehome = true;
|
||||
bool _is_ehome = false;
|
||||
int _check_ehome_count = 3;
|
||||
bool _is_rtsp_interleaved = true;
|
||||
size_t _offset = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user