diff --git a/tutorials/src/bin/basic-tutorial-6.rs b/tutorials/src/bin/basic-tutorial-6.rs index 7dda01525..7f9ab9fe6 100644 --- a/tutorials/src/bin/basic-tutorial-6.rs +++ b/tutorials/src/bin/basic-tutorial-6.rs @@ -3,7 +3,7 @@ use gst::prelude::*; use gst::MessageView; -fn print_caps(caps: gst::Caps, prefix: &str) { +fn print_caps(caps: &gst::Caps, prefix: &str) { if caps.is_any() { println!("{}ANY", prefix); return; @@ -55,7 +55,7 @@ fn print_pad_template_information(factory: &gst::ElementFactory) { let caps = pad_template.get_caps(); println!(" Capabilities:"); - print_caps(caps, " "); + print_caps(&caps, " "); } } @@ -67,11 +67,11 @@ fn print_pad_capabilities(element: &gst::Element, pad_name: &str) { println!("Caps for the {} pad:", pad_name); match pad.get_current_caps() { Some(caps) => { - print_caps(caps, " "); + print_caps(&caps, " "); } None => { let caps = pad.query_caps(None).expect("Failed to query caps on pad"); - print_caps(caps, " "); + print_caps(&caps, " "); } } }