mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
closedcaption: cea608utils: Avoid overflow when deciding which lines to retain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1776>
This commit is contained in:
parent
1675e517b3
commit
aae9d5c0e9
1 changed files with 1 additions and 1 deletions
|
@ -373,7 +373,7 @@ impl Cea608Frame {
|
|||
}
|
||||
let n_rows = self.mode.unwrap().rollup_rows().unwrap();
|
||||
self.display_lines
|
||||
.retain(|line| line.no > (self.base_row - n_rows + 1) as usize);
|
||||
.retain(|line| line.no > self.base_row as usize + 1 - n_rows as usize);
|
||||
for line in self.display_lines.iter_mut() {
|
||||
line.no -= 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue