mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-01 09:13:48 +00:00
textaccumulate: drain to last match on timeout
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2528>
This commit is contained in:
parent
83d16a1cca
commit
22168549fa
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ impl Input {
|
|||
fn drain_to_next_terminator(&mut self, timeout_terminators_regex: &Regex) -> Option<Vec<Item>> {
|
||||
let content = self.items.iter().map(|item| item.content.clone()).join(" ");
|
||||
|
||||
if let Some(idx) = timeout_terminators_regex.find(&content) {
|
||||
if let Some(idx) = timeout_terminators_regex.find_iter(&content).last() {
|
||||
self.drain_to_idx(idx.end())
|
||||
} else {
|
||||
self.drain_all()
|
||||
|
|
Loading…
Reference in a new issue