mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
livesync: Simplify num_duplicate counting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
This commit is contained in:
parent
17a2448237
commit
7c48a299c3
1 changed files with 4 additions and 6 deletions
|
@ -1125,7 +1125,6 @@ impl LiveSync {
|
|||
}
|
||||
};
|
||||
|
||||
let duplicate;
|
||||
let mut caps = None;
|
||||
let mut segment = None;
|
||||
|
||||
|
@ -1139,7 +1138,9 @@ impl LiveSync {
|
|||
caps = state.pending_caps.take();
|
||||
segment = state.pending_segment.take();
|
||||
|
||||
duplicate = lateness != BufferLateness::OnTime;
|
||||
if lateness != BufferLateness::OnTime {
|
||||
state.num_duplicate += 1;
|
||||
}
|
||||
}
|
||||
None => {
|
||||
// Work around borrow checker
|
||||
|
@ -1178,7 +1179,7 @@ impl LiveSync {
|
|||
state.out_buffer.as_ref().unwrap(),
|
||||
state.out_segment.as_ref().unwrap(),
|
||||
);
|
||||
duplicate = true;
|
||||
state.num_duplicate += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1223,9 +1224,6 @@ impl LiveSync {
|
|||
}
|
||||
|
||||
state.num_out += 1;
|
||||
if duplicate {
|
||||
state.num_duplicate += 1;
|
||||
}
|
||||
|
||||
drop(state);
|
||||
|
||||
|
|
Loading…
Reference in a new issue