X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Faac.rs;h=412bc9c8b4c0883403ba31ba897dfd053334b317;hb=2422d9699cd56cbb86ac32b3e8dd026e20a89db5;hp=02223c8a969fa0a5aeebb976b346a44ab87a1663;hpb=4f6124ac474e05ab343505444cdbb69b67829e2c;p=nihav.git diff --git a/nihav-commonfmt/src/codecs/aac.rs b/nihav-commonfmt/src/codecs/aac.rs index 02223c8..412bc9c 100644 --- a/nihav-commonfmt/src/codecs/aac.rs +++ b/nihav-commonfmt/src/codecs/aac.rs @@ -1,5 +1,3 @@ -use std::rc::Rc; -use std::cell::RefCell; use nihav_core::formats::*; use nihav_core::frame::*; use nihav_core::codecs::*; @@ -966,7 +964,7 @@ impl ChannelPair { } fn synth_audio(&mut self, dsp: &mut DSP, abuf: &mut NABufferType, srate_idx: usize) { let mut adata = abuf.get_abuf_f32().unwrap(); - let mut output = adata.get_data_mut(); + let output = adata.get_data_mut().unwrap(); let off0 = abuf.get_offset(self.channel); let off1 = abuf.get_offset(self.channel + 1); self.ics[0].synth_channel(dsp, &mut output[off0..], srate_idx); @@ -1107,7 +1105,7 @@ impl DSP { } struct AACDecoder { - info: Rc, + info: NACodecInfoRef, chmap: NAChannelMap, m4ainfo: M4AInfo, pairs: Vec, @@ -1205,7 +1203,7 @@ impl AACDecoder { } impl NADecoder for AACDecoder { - fn init(&mut self, info: Rc) -> DecoderResult<()> { + fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Audio(_) = info.get_properties() { let edata = info.get_extradata().unwrap(); validate!(edata.len() >= 2);