fixed rtp-info missing for some cameras
This commit is contained in:
parent
9a6e418ea3
commit
dbf4652840
@ -498,9 +498,11 @@ pub(crate) fn parse_play(
|
|||||||
presentation: &mut Presentation,
|
presentation: &mut Presentation,
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
// https://tools.ietf.org/html/rfc2326#section-12.33
|
// https://tools.ietf.org/html/rfc2326#section-12.33
|
||||||
let rtp_info = response
|
let rtp_info = match response
|
||||||
.header(&rtsp_types::headers::RTP_INFO)
|
.header(&rtsp_types::headers::RTP_INFO) {
|
||||||
.ok_or_else(|| "PLAY response has no RTP-Info header".to_string())?;
|
Some(rtsp_info) => rtsp_info,
|
||||||
|
None => return Ok(())
|
||||||
|
};
|
||||||
for s in rtp_info.as_str().split(',') {
|
for s in rtp_info.as_str().split(',') {
|
||||||
let s = s.trim();
|
let s = s.trim();
|
||||||
let mut parts = s.split(';');
|
let mut parts = s.split(';');
|
||||||
|
Loading…
Reference in New Issue
Block a user