mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
feat(util/frame): add method to check if a frame is writable
This commit is contained in:
@@ -208,6 +208,16 @@ impl Frame {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_writable(&mut self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
match av_frame_is_writable(self.as_mut_ptr()) {
|
||||
0 => Ok(()),
|
||||
e => Err(Error::from(e)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn make_writable(&mut self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user