Commit 06bd23f8 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Fix compilation of iterator example

parent a6d9fe4b
......@@ -9,9 +9,13 @@ fn example_main() {
let identity = gst::ElementFactory::make("identity", None).unwrap();
let mut iter = identity.iterate_pads();
while let Some(res) = iter.next() {
match res {
Ok(pad) => println!("Pad: {}", pad.get_name()),
loop {
match iter.next() {
Ok(Some(pad)) => println!("Pad: {}", pad.get_name()),
Ok(None) => {
println!("Done");
break;
}
Err(gst::IteratorError::Resync) => {
println!("Iterator resync");
iter.resync();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment