feat(codec/encoder): add time_base accessor

This commit is contained in:
tilpner
2022-05-20 11:39:16 +02:00
committed by meh
parent 1fbe9f8b3e
commit a969a564b6
+4
View File
@@ -123,6 +123,10 @@ impl Encoder {
}
}
pub fn time_base(&self) -> Rational {
unsafe { Rational::from((*self.as_ptr()).time_base) }
}
pub fn set_time_base<R: Into<Rational>>(&mut self, value: R) {
unsafe {
(*self.as_mut_ptr()).time_base = value.into().into();