format/context: add write_trailer() method

This commit is contained in:
lummax 2015-08-26 10:28:28 +02:00 committed by meh
parent a082998e48
commit 34cbb9b1e6

View File

@ -81,6 +81,15 @@ impl Context {
} }
} }
pub fn write_trailer(&mut self) -> Result<(), Error> {
unsafe {
match av_write_trailer(self.as_mut_ptr()) {
0 => Ok(()),
e => Err(Error::from(e)),
}
}
}
pub fn stream(&self, index: usize) -> Option<Stream> { pub fn stream(&self, index: usize) -> Option<Stream> {
unsafe { unsafe {
if index >= (*self.as_ptr()).nb_streams as usize { if index >= (*self.as_ptr()).nb_streams as usize {