Fixes for removal of SpecificFormattedValues ops on ref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/874>
This commit is contained in:
François Laignel 2022-09-22 00:02:33 +02:00
parent caefa6d33e
commit 0b7259afac
2 changed files with 3 additions and 5 deletions

View file

@ -117,9 +117,7 @@ impl StartedState {
}
fn fragment_duration_since(&self, fragment_closed: gst::ClockTime) -> f32 {
assert!(self.fragment_opened_at.is_some());
let fragment_opened_at = &self.fragment_opened_at.unwrap();
let segment_duration = fragment_closed - fragment_opened_at;
let segment_duration = fragment_closed - self.fragment_opened_at.unwrap();
segment_duration.mseconds() as f32 / 1_000f32
}
}

View file

@ -192,13 +192,13 @@ impl RaptorqEnc {
for (target_time, repair_packet) in Iterator::zip(
delays
.iter()
.map(|delay| base_time.opt_add(running_time).opt_add(delay)),
.map(|&delay| base_time.opt_add(running_time).opt_add(delay)),
encoder
.repair_packets(0, repair_symbols as u32)
.chunks_exact(state.symbols_per_packet)
.enumerate()
.zip(&delays)
.map(|((n, packets), delay)| {
.map(|((n, packets), &delay)| {
let esi = packets[0].payload_id().encoding_symbol_id();
let payload_id = RepairPayloadId {