diff --git a/src/decode/codecs/mod.rs b/src/decode/codecs/mod.rs index 8d28350..a1b2ad7 100644 --- a/src/decode/codecs/mod.rs +++ b/src/decode/codecs/mod.rs @@ -7,8 +7,8 @@ use std::error::Error; use crate::util; pub trait Decoder { - fn write_nalu(&mut self, nalu: util::NALUPacket) -> Result<(), Box>; - fn write_loop(&mut self, chan_in: mpsc::Receiver, err_in: mpsc::Sender>) { + fn write_nalu(&self, nalu: util::NALUPacket) -> Result<(), Box>; + fn write_loop(&self, chan_in: mpsc::Receiver, err_in: mpsc::Sender>) { loop { let nalu = match chan_in.recv() { Ok(x) => x, @@ -20,8 +20,8 @@ pub trait Decoder { } } } - fn read_raw(&mut self) -> Result>; - fn read_loop(&mut self, chan_out: mpsc::Sender, err_in: mpsc::Sender>) { + fn read_raw(&self) -> Result>; + fn read_loop(&self, chan_out: mpsc::Sender, err_in: mpsc::Sender>) { loop { let raw_sample = match self.read_raw() { Ok(x) => x,