feat(util/frame): add method to check if a frame is writable

This commit is contained in:
tilpner
2023-05-24 17:22:59 +02:00
committed by Till Höppner
parent 1172d4eb6a
commit 1d7022e63d
+10
View File
@@ -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 {