scottlamb / retina

High-level RTSP multimedia streaming library, in Rust
https://crates.io/crates/retina
Apache License 2.0
218 stars 46 forks source link

RTSP: Trim whitespace from CSeq header before parsing #77

Closed nemosupremo closed 1 year ago

nemosupremo commented 1 year ago

Working with Longse (also may share the same software/firmware with Herospeed) cameras we found that Retina was unable to communicate with these cameras. Upon analyzing the packets, we saw that these cameras were adding a space after the Cseq header value (So instead of Cseq: 101\r\n, we saw Cseq: 101 \r\n).

This PR simply adds a trim method before the Cseq is parsed so that these cameras can be supported successfully.

longse.pkt.zip

nemosupremo commented 1 year ago

I see, the RFC is pretty explicit so it seems the issue lies with sdroege/rtsp-types; for completeness (there might be other headers) it makes sense to fix the issue there.

nemosupremo commented 1 year ago

Closing this PR as the solution has been implemented in sdroege/rtsp-types 0.0.5

scottlamb commented 1 year ago

I'll prep a new Retina release. For whatever reason rtsp-types releases have been 0.0.z, and according to cargo's rules:

"0.0.z" releases are always major changes.

so retina's Cargo.toml has to change to pick it up.

scottlamb commented 1 year ago

0.4.5 released.