Skip to content

fix: connection failed with some cctv#106

Open
giangndm wants to merge 2 commits intoscottlamb:mainfrom
lumi-distributed:fixed-failed-with-some-cctv
Open

fix: connection failed with some cctv#106
giangndm wants to merge 2 commits intoscottlamb:mainfrom
lumi-distributed:fixed-failed-with-some-cctv

Conversation

@giangndm
Copy link
Copy Markdown

This PR fix some issues with some cctv providers:

  • Some cctv send rtcp in same channel with rtp
  • Some cctv have complex timeout field

Comment thread src/client/rtp.rs
stream_id: usize,
data: Bytes,
) -> Result<Option<PacketItem>, Error> {
if !(data.len() >= 12 && data[0] > 127 && data[0] < 192) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bailing early to avoid the too short and must be version 2 checks in RawPacket::new, right? The former doesn't happen with the test packet in the src/rtp.rs's dahua test, and I think the latter shouldn't happen with any current RTCP packets—they have a similar version field in a similar place.

Do you have some example data that shows the problem? I think we at least should have a unit test of this, and we may be able to improve on the solution.

@scottlamb scottlamb added the need-input Need input, usually from the issue reporter, to proceed label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-input Need input, usually from the issue reporter, to proceed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants