mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-21 07:06:19 +00:00
cea608overlay: ensure tha the list of lines remains sorted by line number
Otherwise, when iterating over the lines, they may be written out of order. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2051>
This commit is contained in:
parent
5639a0640e
commit
4f4f84a615
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ impl Cea608Frame {
|
|||
line: VecDeque::new(),
|
||||
initial_preamble: None,
|
||||
});
|
||||
lines.back_mut().unwrap()
|
||||
lines.make_contiguous().sort_by_key(|line| line.no);
|
||||
lines.iter_mut().find(|line| line.no == row).unwrap()
|
||||
};
|
||||
while line.line.len() <= column {
|
||||
line.line.push_back(Cea608Cell::Empty);
|
||||
|
|
Loading…
Reference in a new issue