filter/source: add flush() method

This commit is contained in:
lummax
2015-09-19 12:32:59 +02:00
committed by meh
parent fc6c0755ef
commit 4471ffc934
+8
View File
@@ -1,3 +1,5 @@
use std::ptr;
use ffi::*;
use ::{Error, Frame};
use super::Context;
@@ -27,4 +29,10 @@ impl<'a> Source<'a> {
}
}
}
pub fn flush(&mut self) -> Result<(), Error> {
unsafe {
self.add(&Frame::wrap(ptr::null_mut()))
}
}
}