format/stream: add set_time_base()

This commit is contained in:
lummax 2015-08-30 11:48:03 +02:00 committed by meh
parent 2d3b77f43b
commit edcddc91e7

View File

@ -25,6 +25,12 @@ impl<'a> StreamMut<'a> {
} }
impl<'a> StreamMut<'a> { impl<'a> StreamMut<'a> {
pub fn set_time_base<R: Into<Rational>>(&mut self, value: R) {
unsafe {
(*self.as_mut_ptr()).time_base = value.into().into();
}
}
pub fn set_frame_rate<R: Into<Rational>>(&mut self, value: R) { pub fn set_frame_rate<R: Into<Rational>>(&mut self, value: R) {
unsafe { unsafe {
av_stream_set_r_frame_rate(self.as_mut_ptr(), value.into().into()); av_stream_set_r_frame_rate(self.as_mut_ptr(), value.into().into());