util/frame: change best_effort_timestamp to timestamp

This commit is contained in:
meh 2015-05-26 20:37:01 +02:00
parent 883654ebda
commit 038440dd41

View File

@ -84,9 +84,12 @@ impl Frame {
}
}
pub fn best_effort_timestamp(&self) -> i64 {
pub fn timestamp(&self) -> Option<i64> {
unsafe {
av_frame_get_best_effort_timestamp(self.ptr) as i64
match av_frame_get_best_effort_timestamp(self.ptr) {
AV_NOPTS_VALUE => None,
t => Some(t as i64)
}
}
}