codec/video: fix style
This commit is contained in:
parent
a85bd6d6c8
commit
f223ada727
@ -57,11 +57,12 @@ impl<'a> Iterator for RateIter<'a> {
|
|||||||
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
|
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
|
||||||
unsafe {
|
unsafe {
|
||||||
if !self.ptr.is_null() && (*self.ptr) != (AVRational { num: 0, den: 0 }) {
|
if !self.ptr.is_null() && (*self.ptr) != (AVRational { num: 0, den: 0 }) {
|
||||||
let element = self.ptr;
|
let rate = (*self.ptr).into();
|
||||||
self.ptr = self.ptr.offset(1);
|
self.ptr = self.ptr.offset(1);
|
||||||
|
|
||||||
Some(Rational::from(*element))
|
Some(rate)
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,10 +87,10 @@ impl<'a> Iterator for FormatIter<'a> {
|
|||||||
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
|
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
|
||||||
unsafe {
|
unsafe {
|
||||||
if !self.ptr.is_null() && (*self.ptr) != AVPixelFormat::AV_PIX_FMT_NONE {
|
if !self.ptr.is_null() && (*self.ptr) != AVPixelFormat::AV_PIX_FMT_NONE {
|
||||||
let element = self.ptr;
|
let format = (*self.ptr).into();
|
||||||
self.ptr = self.ptr.offset(1);
|
self.ptr = self.ptr.offset(1);
|
||||||
|
|
||||||
Some((*element).into())
|
Some(format)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
None
|
None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user