switch to refcounted buffers
[nihav.git] / nihav-realmedia / src / codecs / ra144.rs
index 23e32f2aa5c4e4133f38392ebe1565b369500b41..19cf38b841c713b8b84ea54bfec055c36ac69e11 100644 (file)
@@ -264,9 +264,9 @@ impl NADecoder for RA144Decoder {
 
         let duration = NBLOCKS * BLOCKSIZE * nframes;
 
-        let mut abuf = alloc_audio_buffer(self.ainfo, duration, self.chmap.clone())?;
+        let abuf = alloc_audio_buffer(self.ainfo, duration, self.chmap.clone())?;
         let mut adata = abuf.get_abuf_i16().unwrap();
-        let mut dst = adata.get_data_mut();
+        let dst = adata.get_data_mut().unwrap();
 
         for (input, output) in pktbuf.chunks(FRAME_SIZE).zip(dst.chunks_mut(NBLOCKS * BLOCKSIZE)) {
             let mut br = BitReader::new(input, input.len(), BitReaderMode::BE);