*: returning &mut Self from setters was an awful idea
Deref breaks things.
This commit is contained in:
@ -83,12 +83,10 @@ impl Output {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_metadata(&mut self, dictionary: Dictionary) -> &mut Self {
|
||||
pub fn set_metadata(&mut self, dictionary: Dictionary) {
|
||||
unsafe {
|
||||
(*self.as_mut_ptr()).metadata = dictionary.disown();
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,20 +29,16 @@ impl<'a> StreamMut<'a> {
|
||||
}
|
||||
|
||||
impl<'a> StreamMut<'a> {
|
||||
pub fn set_time_base<R: Into<Rational>>(&mut self, value: R) -> &mut Self {
|
||||
pub fn set_time_base<R: Into<Rational>>(&mut self, value: R) {
|
||||
unsafe {
|
||||
(*self.as_mut_ptr()).time_base = value.into().into();
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_rate<R: Into<Rational>>(&mut self, value: R) -> &mut Self {
|
||||
pub fn set_rate<R: Into<Rational>>(&mut self, value: R) {
|
||||
unsafe {
|
||||
av_stream_set_r_frame_rate(self.as_mut_ptr(), value.into().into());
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user