forked from mirrors/gstreamer-rs
Fix compilation of iterator example
This commit is contained in:
parent
a6d9fe4b0a
commit
06bd23f833
1 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue