util/frame: make set_pts take an Option

This commit is contained in:
meh 2015-09-09 16:44:58 +02:00
parent bc5ef9cdcf
commit 3f282a8202

View File

@ -85,9 +85,9 @@ impl Frame {
} }
} }
pub fn set_pts(&mut self, value: i64) { pub fn set_pts(&mut self, value: Option<i64>) {
unsafe { unsafe {
(*self.as_mut_ptr()).pts = value; (*self.as_mut_ptr()).pts = value.unwrap_or(AV_NOPTS_VALUE);
} }
} }