gstreamer-sdp: calling attributes_len on SDPMediaRef received from MediaIterMut segfaults
When you call attributes_len
on a SDPMediaRef
which you acquired via MediaIterMut
the program will segfault.
Shortest example:
use gstreamer_sdp::SDPMessage;
fn main() {
gstreamer::init();
let sdp = r#"
v=0
o=- 2449729779344774154 0 IN IP4 0.0.0.0
s=-
t=0
m=video 9 UDP/TLS/RTP/SAVPF 127
c=IN IP4 0.0.0.0
a=sendonly
"#;
let mut sdp = SDPMessage::parse_buffer(sdp.as_bytes()).unwrap();
for media in sdp.medias_mut() {
println!("Fetch len");
let x = media.attributes_len();
}
}
this occurs for me on Void Linux, with gstreamer 1.16.2 with the gstreamer-sdp
crate at version 0.16.5
Edited by eater