diff --git a/src/format/context/output.rs b/src/format/context/output.rs index 8ddd97a..dc1e4cc 100644 --- a/src/format/context/output.rs +++ b/src/format/context/output.rs @@ -36,11 +36,10 @@ impl Output { } } - pub fn write_header(&mut self, dictionary: Dictionary) -> Result { + pub fn write_header(&mut self) -> Result<(), Error> { unsafe { - let mut d = dictionary.disown(); - match avformat_write_header(self.as_mut_ptr(), &mut d) { - 0 => Ok(Dictionary::own(d)), + match avformat_write_header(self.as_mut_ptr(), ptr::null_mut()) { + 0 => Ok(()), e => Err(Error::from(e)), } }