diff --git a/Cargo.toml b/Cargo.toml index 00470f6..fed98ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ md5 = "0.8" pyo3 = { version = "0.25", features = ["extension-module"], optional = true } pyo3-log = { version = "0.12", optional = true } raptorq = "2.0" -raptor-code = "1.0" +raptor-code = "1.0.9" opentelemetry = { version = "0.30", optional = true } opentelemetry-semantic-conventions = { version = "0.30" , optional = true } rand = "0.9" diff --git a/src/fec/raptor.rs b/src/fec/raptor.rs index e0fcb07..060e5df 100644 --- a/src/fec/raptor.rs +++ b/src/fec/raptor.rs @@ -17,7 +17,8 @@ impl RaptorEncoder { impl FecEncoder for RaptorEncoder { fn encode(&self, data: &[u8]) -> Result>> { - let mut encoder = raptor_code::SourceBlockEncoder::new(data, self.nb_source_symbols); + let mut encoder = raptor_code::SourceBlockEncoder::new(data, self.nb_source_symbols) + .map_err(|_| FluteError::new("Fail to create Raptor codec"))?; let nb_source_symbols = encoder.nb_source_symbols() as usize; let n = nb_source_symbols + self.nb_parity_symbols;