diff --git a/src/nal_unit.rs b/src/nal_unit.rs index 102c3d0..434e3e6 100644 --- a/src/nal_unit.rs +++ b/src/nal_unit.rs @@ -279,9 +279,10 @@ pub struct InitialNalUnits { pub frame: NalUnit, } -impl InitialNalUnits { - /// Return an [Iterator] over the NAL units generated at the start of encoding. - pub fn into_iter(self) -> impl Iterator { +impl std::iter::IntoIterator for InitialNalUnits { + type Item = NalUnit; + type IntoIter = alloc::vec::IntoIter; + fn into_iter(self) -> Self::IntoIter { vec![self.sps, self.pps, self.frame].into_iter() } }