format/context: add write_trailer()
method
This commit is contained in:
parent
a082998e48
commit
34cbb9b1e6
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user