Skip to content

Commit cf12c76

Browse files
committed
Add Sink::time_base
Calls `av_buffersink_get_time_base`.
1 parent c239937 commit cf12c76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/filter/context/sink.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::Context;
22
use ffi::*;
33
use libc::c_int;
4-
use {Error, Frame};
4+
use {Error, Frame, Rational};
55

66
pub struct Sink<'a> {
77
ctx: &'a mut Context<'a>,
@@ -41,4 +41,8 @@ impl<'a> Sink<'a> {
4141
av_buffersink_set_frame_size(self.ctx.as_mut_ptr(), value);
4242
}
4343
}
44+
45+
pub fn time_base(&self) -> Rational {
46+
unsafe { av_buffersink_get_time_base(self.ctx.as_ptr()) }.into()
47+
}
4448
}

0 commit comments

Comments
 (0)