codec/decoder: add time_base getter
This commit is contained in:
parent
038440dd41
commit
dc7837b0a9
@ -23,7 +23,7 @@ use std::ops::Deref;
|
||||
use ffi::*;
|
||||
use super::{Id, Profile};
|
||||
use super::context::Opened;
|
||||
use ::{Codec, Error, Discard};
|
||||
use ::{Codec, Error, Discard, Rational};
|
||||
use ::media;
|
||||
|
||||
pub struct Decoder(pub Opened);
|
||||
@ -97,6 +97,12 @@ impl Decoder {
|
||||
from_raw_parts((*self.ptr).subtitle_header, (*self.ptr).subtitle_header_size as usize)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn time_base(&self) -> Rational {
|
||||
unsafe {
|
||||
Rational((*self.ptr).time_base)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for Decoder {
|
||||
|
Loading…
x
Reference in New Issue
Block a user