util/rational: some more refactoring
This commit is contained in:
@ -105,14 +105,14 @@ impl Decoder {
|
||||
None
|
||||
}
|
||||
else {
|
||||
Some(Rational(value))
|
||||
Some(Rational::from(value))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn time_base(&self) -> Rational {
|
||||
unsafe {
|
||||
Rational((*self.as_ptr()).time_base)
|
||||
Rational::from((*self.as_ptr()).time_base)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ impl Video {
|
||||
|
||||
pub fn aspect_ratio(&self) -> Rational {
|
||||
unsafe {
|
||||
Rational((*self.as_ptr()).sample_aspect_ratio)
|
||||
Rational::from((*self.as_ptr()).sample_aspect_ratio)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user