util/rational: some more refactoring

This commit is contained in:
meh
2015-06-25 22:23:33 +02:00
parent 23b414b01e
commit bb4263b7be
7 changed files with 38 additions and 26 deletions

View File

@ -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)
}
}
}

View File

@ -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)
}
}