const RUN_TAB: [usize; 16] = [ 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64 ];
impl NADecoder for BinkAudioDecoder {
- fn init(&mut self, info: Rc<NACodecInfo>) -> DecoderResult<()> {
+ fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Audio(ainfo) = info.get_properties() {
let srate = ainfo.get_sample_rate();
let channels = ainfo.get_channels();
let mut frm = NAFrame::new_from_pkt(pkt, info, abuf);
frm.set_duration(Some(self.duration as u64));
frm.set_keyframe(false);
- Ok(Rc::new(RefCell::new(frm)))
+ Ok(frm.into_ref())
} else {
Err(DecoderError::InvalidData)
}