examples: Update for DiscovererStreamInfo::stream_id() being nullable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1266>
This commit is contained in:
Sebastian Dröge 2023-05-22 12:17:13 +03:00
parent a13dcad033
commit b6919d7c99

View file

@ -37,7 +37,11 @@ fn print_tags(info: &DiscovererInfo) {
fn print_stream_info(stream: &DiscovererStreamInfo) {
println!("Stream: ");
println!(" Stream id: {}", stream.stream_id());
if let Some(stream_id) = stream.stream_id() {
println!(" Stream id: {}", stream_id);
}
let caps_str = match stream.caps() {
Some(caps) => caps.to_string(),
None => String::from("--"),