util/frame: make pts return Option<i64>
This commit is contained in:
@ -79,9 +79,12 @@ impl Frame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pts(&self) -> i64 {
|
pub fn pts(&self) -> Option<i64> {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.as_ptr()).pts as i64
|
match (*self.as_ptr()).pts {
|
||||||
|
AV_NOPTS_VALUE => None,
|
||||||
|
pts => Some(pts as i64),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user