X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-duck%2Fsrc%2Fcodecs%2Ftruemotion1.rs;h=2c8e5d273933c901763836beb5d8dcd894f2afda;hp=a156705a24bceae75121cb61da9b25506470c904;hb=2422d9699cd56cbb86ac32b3e8dd026e20a89db5;hpb=cd830591a8770b4a56ce9b938574adcee3ed33f5 diff --git a/nihav-duck/src/codecs/truemotion1.rs b/nihav-duck/src/codecs/truemotion1.rs index a156705..2c8e5d2 100644 --- a/nihav-duck/src/codecs/truemotion1.rs +++ b/nihav-duck/src/codecs/truemotion1.rs @@ -168,7 +168,7 @@ impl Default for FrameBuf { #[derive(Default)] struct TM1Decoder { - info: Rc, + info: NACodecInfoRef, last_delta_set: usize, last_table_idx: usize, delta_tables: DeltaTables, @@ -515,10 +515,10 @@ impl TM1Decoder { } impl NADecoder for TM1Decoder { - fn init(&mut self, info: Rc) -> DecoderResult<()> { + fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> { if let NACodecTypeInfo::Video(vinfo) = info.get_properties() { let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(vinfo.get_width(), vinfo.get_height(), false, YUV410_FORMAT)); - self.info = Rc::new(NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata())); + self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref(); Ok(()) } else { Err(DecoderError::InvalidData)