switch NACodecInfo to Arc
[nihav.git] / nihav-rad / src / codecs / binkaud.rs
index 2bf93ff351df144cc4128f5c1e9aa69cec080724..182c6c91f2a5d7e370f429e6d3dda1d895f58be6 100644 (file)
@@ -178,7 +178,7 @@ const CRITICAL_FREQS: [usize; MAX_BANDS] = [
 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();
@@ -242,7 +242,7 @@ impl NADecoder for BinkAudioDecoder {
             let mut adata = abuf.get_abuf_f32().unwrap();
             let mut off0 = adata.get_offset(0);
             let mut off1 = adata.get_offset(1);
-            let mut dst = adata.get_data_mut();
+            let dst = adata.get_data_mut().unwrap();
 
             let num_subframes = nsamples / self.duration / self.chmap.num_channels() / 2;