From ef11b2bec47429d4394d37ab894f218bf3c49c25 Mon Sep 17 00:00:00 2001 From: meh Date: Sat, 25 Feb 2017 19:30:08 +0100 Subject: [PATCH] format/context/output: return the Dictionary on `write_header_with` --- src/format/context/output.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/format/context/output.rs b/src/format/context/output.rs index dc1e4cc..3025fbc 100644 --- a/src/format/context/output.rs +++ b/src/format/context/output.rs @@ -45,15 +45,13 @@ impl Output { } } - pub fn write_header_with(&mut self, options: Dictionary) -> Result<(), Error> { + pub fn write_header_with(&mut self, options: Dictionary) -> Result { unsafe { let mut opts = options.disown(); let res = avformat_write_header(self.as_mut_ptr(), &mut opts); - Dictionary::own(opts); - match res { - 0 => Ok(()), + 0 => Ok(Dictionary::own(opts)), e => Err(Error::from(e)), } }