codec/encoder: add set_time_base()
The documentation [1] states: `encoding: MUST be set by user`. [1]: https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html#ab7bfeb9fa5840aac090e2b0bd0ef7589
This commit is contained in:
parent
b50a3673a1
commit
bc2a39a48b
@ -87,6 +87,12 @@ impl Encoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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: Option<R>) {
|
pub fn set_frame_rate<R: Into<Rational>>(&mut self, value: Option<R>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
if let Some(value) = value {
|
if let Some(value) = value {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user