format/context/output: pass muxer options to avformat_write_header
This commit is contained in:
parent
2aebc761dd
commit
e04e9da298
@ -36,10 +36,11 @@ impl Output {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn write_header(&mut self) -> Result<(), Error> {
|
pub fn write_header(&mut self, dictionary: Dictionary) -> Result<Dictionary, Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
match avformat_write_header(self.as_mut_ptr(), ptr::null_mut()) {
|
let mut d = dictionary.disown();
|
||||||
0 => Ok(()),
|
match avformat_write_header(self.as_mut_ptr(), &mut d) {
|
||||||
|
0 => Ok(Dictionary::own(d)),
|
||||||
e => Err(Error::from(e)),
|
e => Err(Error::from(e)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user