Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

接收第三方国标设备视频流出现 unkonw ps data 0XXX 无法播放的处理 #52

Open
weitCode opened this issue May 31, 2022 · 0 comments

Comments

@weitCode
Copy link

描述(Description)
接收第三方国标设备视频流出现 unkonw ps data 0XXX 的处理
排查发现是设备RTP包有extension拓展时,解析RTP包没有跳过导致
源码修改解决
srs_app_gb28181.cpp ---75--85行

sequence_number = stream->read_2bytes();
timestamp = stream->read_4bytes();
ssrc = stream->read_4bytes();

 // jump header extension  RFC3550 RTP Header Extension
if(extension){
    int16_t iexid = stream->read_2bytes();
    int16_t iexlen = stream->read_2bytes();

    while(iexlen--){
        stream->read_4bytes();
    }
}

// TODO: FIXME: check sequence number.

期望行为(Expect)
小白就不提交PR了,作者可以考虑更稳妥的做法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant