Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/text/wrap
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-09-08 15:33:31 +0300
committerSebastian Dröge <slomo@coaxion.net>2021-09-08 15:35:41 +0300
commit96d86eaa069165f42abe6a0907c99016cab5db52 (patch)
tree17a116d8cb8dac35fb85d2f4d6a92ed675c0e084 /text/wrap
parent626df039615f38535fed9d6f1f7c53ddeb4f40f0 (diff)
Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI configuration, and fix various warnings / clean up code.
Diffstat (limited to 'text/wrap')
-rw-r--r--text/wrap/src/gsttextwrap/imp.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/text/wrap/src/gsttextwrap/imp.rs b/text/wrap/src/gsttextwrap/imp.rs
index 7fef1f06..d01e310a 100644
--- a/text/wrap/src/gsttextwrap/imp.rs
+++ b/text/wrap/src/gsttextwrap/imp.rs
@@ -201,13 +201,14 @@ impl TextWrap {
let mut bufferlist = gst::BufferList::new();
let n_lines = std::cmp::max(self.settings.lock().unwrap().lines, 1);
- if state
+ let add_buffer = state
.start_ts
.zip(Some(accumulate_time))
.map_or(false, |(start_ts, accumulate_time)| {
start_ts + accumulate_time < pts
- })
- {
+ });
+
+ if add_buffer {
let mut buf =
gst::Buffer::from_mut_slice(mem::take(&mut state.current_text).into_bytes());
{