filter::Source: add close method
Expose av_buffersrc_close.
This commit is contained in:
parent
d3270133be
commit
f1ccd4e696
@ -31,4 +31,13 @@ impl<'a> Source<'a> {
|
|||||||
pub fn flush(&mut self) -> Result<(), Error> {
|
pub fn flush(&mut self) -> Result<(), Error> {
|
||||||
unsafe { self.add(&Frame::wrap(ptr::null_mut())) }
|
unsafe { self.add(&Frame::wrap(ptr::null_mut())) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn close(&mut self, pts: i64) -> Result<(), Error> {
|
||||||
|
unsafe {
|
||||||
|
match av_buffersrc_close(self.ctx.as_mut_ptr(), pts, 0) {
|
||||||
|
0 => Ok(()),
|
||||||
|
e => Err(Error::from(e)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user