X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-game%2Fsrc%2Fcodecs%2Flhst500f22.rs;h=e795070050ab70469e07d3ef1ca61dd49e000402;hb=fa57381ec2a3b8c441aa1388492b9ca037cfcf78;hp=eea2c9f483624fe1f216f8a1cfd08182d82668c3;hpb=3e52414f742a961885778d9c851224176a851405;p=nihav.git diff --git a/nihav-game/src/codecs/lhst500f22.rs b/nihav-game/src/codecs/lhst500f22.rs index eea2c9f..e795070 100644 --- a/nihav-game/src/codecs/lhst500f22.rs +++ b/nihav-game/src/codecs/lhst500f22.rs @@ -313,6 +313,7 @@ impl LHDecoder { } Ok(()) } + #[allow(clippy::identity_op)] fn unpack_samples(&mut self, br: &mut BitReader) -> DecoderResult<()> { for grp in 0..3 { for gr in 0..4 { @@ -368,7 +369,7 @@ impl NADecoder for LHDecoder { fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Audio(ainfo) = info.get_properties() { self.ainfo = NAAudioInfo::new(ainfo.get_sample_rate(), 1, SND_F32P_FORMAT, CODEC_SAMPLES); - self.info = info.replace_info(NACodecTypeInfo::Audio(self.ainfo.clone())); + self.info = info.replace_info(NACodecTypeInfo::Audio(self.ainfo)); self.chmap = NAChannelMap::from_str("C").unwrap(); Ok(()) } else { @@ -418,6 +419,12 @@ impl NADecoder for LHDecoder { } } +impl NAOptionHandler for LHDecoder { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option { None } +} + pub fn get_decoder() -> Box { Box::new(LHDecoder::new()) }