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

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-12-13 12:43:16 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-12-13 12:43:16 +0300
commit3f904553ea1336fc73333ec680493c41250a03fe (patch)
treeea270ea2f9b5484fc729a4a174ea2a0261e89f9a
parent289e8a08c31610fbf62056f8a156eb647e9c3a2a (diff)
Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1011>
-rw-r--r--audio/audiofx/src/audioecho/ring_buffer.rs4
-rw-r--r--audio/audiofx/src/audioloudnorm/imp.rs9
-rw-r--r--audio/audiofx/src/hrtfrender/imp.rs2
-rw-r--r--audio/csound/tests/csound_filter.rs5
-rw-r--r--audio/lewton/src/lewtondec/imp.rs2
-rw-r--r--generic/sodium/src/decrypter/imp.rs2
-rw-r--r--generic/threadshare/examples/benchmark.rs2
-rw-r--r--generic/threadshare/src/jitterbuffer/imp.rs8
-rw-r--r--mux/fmp4/examples/dash_vod.rs2
-rw-r--r--mux/fmp4/src/fmp4mux/boxes.rs4
-rw-r--r--mux/mp4/src/mp4mux/boxes.rs8
-rw-r--r--net/aws/src/aws_transcribe_parse/imp.rs4
-rw-r--r--net/hlssink3/src/playlist.rs2
-rw-r--r--net/ndi/src/ndisrc/receiver.rs4
-rw-r--r--net/onvif/src/onvifmetadataoverlay/imp.rs4
-rw-r--r--net/raptorq/src/raptorqenc/imp.rs2
-rw-r--r--net/rtp/src/av1/depay/imp.rs4
-rw-r--r--net/rtp/src/av1/pay/imp.rs2
-rw-r--r--net/rtp/src/gcc/imp.rs31
-rw-r--r--net/webrtc/src/webrtcsink/imp.rs8
-rw-r--r--utils/uriplaylistbin/tests/uriplaylistbin.rs2
-rw-r--r--video/closedcaption/src/caption_frame.rs2
-rw-r--r--video/closedcaption/src/cea608tott/imp.rs2
-rw-r--r--video/closedcaption/src/jsontovtt/imp.rs2
-rw-r--r--video/closedcaption/src/mcc_enc/imp.rs2
-rw-r--r--video/rav1e/src/rav1enc/imp.rs2
-rw-r--r--video/videofx/src/videocompare/imp.rs2
27 files changed, 57 insertions, 66 deletions
diff --git a/audio/audiofx/src/audioecho/ring_buffer.rs b/audio/audiofx/src/audioecho/ring_buffer.rs
index aa6417e52..7e811744a 100644
--- a/audio/audiofx/src/audioecho/ring_buffer.rs
+++ b/audio/audiofx/src/audioecho/ring_buffer.rs
@@ -15,8 +15,8 @@ pub struct RingBuffer {
impl RingBuffer {
pub fn new(size: usize) -> Self {
- let mut buffer = Vec::with_capacity(size as usize);
- buffer.extend(iter::repeat(0.0).take(size as usize));
+ let mut buffer = Vec::with_capacity(size);
+ buffer.extend(iter::repeat(0.0).take(size));
Self {
buffer: buffer.into_boxed_slice(),
diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs
index 915e5cb09..d6740171e 100644
--- a/audio/audiofx/src/audioloudnorm/imp.rs
+++ b/audio/audiofx/src/audioloudnorm/imp.rs
@@ -611,10 +611,9 @@ impl State {
// the position where we have to start writing the next 100ms in the next
// iteration.
- let mut outbuf = gst::Buffer::with_size(
- self.current_samples_per_frame as usize * self.info.bpf() as usize,
- )
- .map_err(|_| gst::FlowError::Error)?;
+ let mut outbuf =
+ gst::Buffer::with_size(self.current_samples_per_frame * self.info.bpf() as usize)
+ .map_err(|_| gst::FlowError::Error)?;
{
let outbuf = outbuf.get_mut().unwrap();
let mut dst = outbuf.map_writable().map_err(|_| gst::FlowError::Error)?;
@@ -819,7 +818,7 @@ impl State {
// adjustment. frame_type should only ever be set to Final at the end if we ended up in
// Inner state before.
if self.frame_type == FrameType::First
- && (src.len() / self.info.channels() as usize) < self.current_samples_per_frame as usize
+ && (src.len() / self.info.channels() as usize) < self.current_samples_per_frame
{
self.process_first_frame_is_last(imp)?;
}
diff --git a/audio/audiofx/src/hrtfrender/imp.rs b/audio/audiofx/src/hrtfrender/imp.rs
index 97fc6a0c3..06d496891 100644
--- a/audio/audiofx/src/hrtfrender/imp.rs
+++ b/audio/audiofx/src/hrtfrender/imp.rs
@@ -373,7 +373,7 @@ impl HrtfRender {
let (prev_offset, _) = state.adapter.prev_offset();
let offset = prev_offset.checked_add(distance_samples).unwrap_or(0);
- let duration_samples = outputsz / outbpf as usize;
+ let duration_samples = outputsz / outbpf;
let duration = samples_to_time(duration_samples as u64);
(pts, offset, duration)
diff --git a/audio/csound/tests/csound_filter.rs b/audio/csound/tests/csound_filter.rs
index 275a90e31..d52bb3b1d 100644
--- a/audio/csound/tests/csound_filter.rs
+++ b/audio/csound/tests/csound_filter.rs
@@ -260,10 +260,7 @@ fn csound_filter_underflow() {
}
assert_eq!(num_buffers, UNDERFLOW_NUM_BUFFERS / 2);
- assert_eq!(
- num_samples as usize,
- UNDERFLOW_NUM_SAMPLES * UNDERFLOW_NUM_BUFFERS
- );
+ assert_eq!(num_samples, UNDERFLOW_NUM_SAMPLES * UNDERFLOW_NUM_BUFFERS);
}
// Verifies that the caps negotiation is properly done, by pushing buffers whose caps
diff --git a/audio/lewton/src/lewtondec/imp.rs b/audio/lewton/src/lewtondec/imp.rs
index 18579b681..977c06051 100644
--- a/audio/lewton/src/lewtondec/imp.rs
+++ b/audio/lewton/src/lewtondec/imp.rs
@@ -405,7 +405,7 @@ impl LewtonDec {
let outbuf = if let Some(ref reorder_map) = state.reorder_map {
let mut outbuf = self
.obj()
- .allocate_output_buffer(sample_count as usize * audio_info.bpf() as usize);
+ .allocate_output_buffer(sample_count * audio_info.bpf() as usize);
{
// And copy the decoded data into our output buffer while reordering the channels to the
// GStreamer channel order
diff --git a/generic/sodium/src/decrypter/imp.rs b/generic/sodium/src/decrypter/imp.rs
index 1e0fd5f7a..f01ee29b8 100644
--- a/generic/sodium/src/decrypter/imp.rs
+++ b/generic/sodium/src/decrypter/imp.rs
@@ -498,7 +498,7 @@ impl Decrypter {
gst::debug!(CAT, obj: pad, "Requested offset: {}", offset);
gst::debug!(CAT, obj: pad, "Requested size: {}", requested_size);
- let chunk_index = offset as u64 / block_size as u64;
+ let chunk_index = offset / block_size as u64;
gst::debug!(CAT, obj: pad, "Stream Block index: {}", chunk_index);
let pull_offset = offset - (chunk_index * block_size as u64);
diff --git a/generic/threadshare/examples/benchmark.rs b/generic/threadshare/examples/benchmark.rs
index c7e98af75..3903f7a1f 100644
--- a/generic/threadshare/examples/benchmark.rs
+++ b/generic/threadshare/examples/benchmark.rs
@@ -158,7 +158,7 @@ fn main() {
let context = build_context();
let source = gst::ElementFactory::make("ts-tonesrc")
.name(format!("source-{}", i).as_str())
- .property("samples-per-buffer", (wait as u32) * 8000 / 1000)
+ .property("samples-per-buffer", wait * 8000 / 1000)
.property("context", &context)
.property("context-wait", wait)
.build()
diff --git a/generic/threadshare/src/jitterbuffer/imp.rs b/generic/threadshare/src/jitterbuffer/imp.rs
index 7105720a0..289739bcc 100644
--- a/generic/threadshare/src/jitterbuffer/imp.rs
+++ b/generic/threadshare/src/jitterbuffer/imp.rs
@@ -28,7 +28,7 @@ use gst_rtp::RTPBuffer;
use once_cell::sync::Lazy;
-use std::cmp::{max, min, Ordering};
+use std::cmp::Ordering;
use std::collections::{BTreeSet, VecDeque};
use std::mem;
use std::sync::Arc;
@@ -412,7 +412,7 @@ impl SinkHandler {
}
if let Some(last_in_seqnum) = inner.last_in_seqnum {
- let gap = gst_rtp::compare_seqnum(last_in_seqnum as u16, seq);
+ let gap = gst_rtp::compare_seqnum(last_in_seqnum, seq);
if gap == 1 {
self.calculate_packet_spacing(inner, &mut state, rtptime, pts);
} else {
@@ -463,7 +463,7 @@ impl SinkHandler {
state.equidistant += 1;
}
- state.equidistant = min(max(state.equidistant, -7), 7);
+ state.equidistant = state.equidistant.clamp(-7, 7);
inner.last_rtptime = Some(rtptime);
@@ -679,7 +679,7 @@ impl SrcHandler {
// FIXME reason why we can expect Some for the 2 lines below
let mut last_popped_pts = state.last_popped_pts.unwrap();
let interval = pts.into().unwrap().saturating_sub(last_popped_pts);
- let spacing = interval / (gap as u64 + 1);
+ let spacing = interval / (gap + 1);
*discont = true;
diff --git a/mux/fmp4/examples/dash_vod.rs b/mux/fmp4/examples/dash_vod.rs
index eb291d6eb..5dbcea81b 100644
--- a/mux/fmp4/examples/dash_vod.rs
+++ b/mux/fmp4/examples/dash_vod.rs
@@ -225,7 +225,7 @@ fn main() -> Result<(), Error> {
"###,
duration = duration, segment_timeline = segment_timeline);
- std::fs::write(path, &manifest).expect("failed to write manifest");
+ std::fs::write(path, manifest).expect("failed to write manifest");
})
.build(),
);
diff --git a/mux/fmp4/src/fmp4mux/boxes.rs b/mux/fmp4/src/fmp4mux/boxes.rs
index 938d1c71f..52f956d69 100644
--- a/mux/fmp4/src/fmp4mux/boxes.rs
+++ b/mux/fmp4/src/fmp4mux/boxes.rs
@@ -1111,8 +1111,8 @@ fn write_visual_sample_entry(
if let Ok(cll) = gst_video::VideoContentLightLevel::from_caps(&stream.caps) {
write_box(v, b"clli", move |v| {
- v.extend((cll.max_content_light_level() as u16).to_be_bytes());
- v.extend((cll.max_frame_average_light_level() as u16).to_be_bytes());
+ v.extend((cll.max_content_light_level()).to_be_bytes());
+ v.extend((cll.max_frame_average_light_level()).to_be_bytes());
Ok(())
})?;
}
diff --git a/mux/mp4/src/mp4mux/boxes.rs b/mux/mp4/src/mp4mux/boxes.rs
index 760e627d3..219dc75dd 100644
--- a/mux/mp4/src/mp4mux/boxes.rs
+++ b/mux/mp4/src/mp4mux/boxes.rs
@@ -928,8 +928,8 @@ fn write_visual_sample_entry(
if let Ok(cll) = gst_video::VideoContentLightLevel::from_caps(&stream.caps) {
write_box(v, b"clli", move |v| {
- v.extend((cll.max_content_light_level() as u16).to_be_bytes());
- v.extend((cll.max_frame_average_light_level() as u16).to_be_bytes());
+ v.extend((cll.max_content_light_level()).to_be_bytes());
+ v.extend((cll.max_frame_average_light_level()).to_be_bytes());
Ok(())
})?;
}
@@ -1454,7 +1454,7 @@ fn write_cslg(
let composition_start_time = stream
.earliest_pts
.nseconds()
- .mul_div_round(timescale as u64, gst::ClockTime::SECOND.nseconds() as u64)
+ .mul_div_round(timescale as u64, gst::ClockTime::SECOND.nseconds())
.context("too earliest PTS")?;
v.extend(composition_start_time.to_be_bytes());
@@ -1462,7 +1462,7 @@ fn write_cslg(
let composition_end_time = stream
.end_pts
.nseconds()
- .mul_div_round(timescale as u64, gst::ClockTime::SECOND.nseconds() as u64)
+ .mul_div_round(timescale as u64, gst::ClockTime::SECOND.nseconds())
.context("too end PTS")?;
v.extend(composition_end_time.to_be_bytes());
diff --git a/net/aws/src/aws_transcribe_parse/imp.rs b/net/aws/src/aws_transcribe_parse/imp.rs
index c686bbf81..b8ba0fd5a 100644
--- a/net/aws/src/aws_transcribe_parse/imp.rs
+++ b/net/aws/src/aws_transcribe_parse/imp.rs
@@ -170,8 +170,8 @@ impl TranscribeParse {
}
};
- let start_pts = ((start_time as f64 * 1_000_000_000.0) as u64).nseconds();
- let end_pts = ((end_time as f64 * 1_000_000_000.0) as u64).nseconds();
+ let start_pts = ((start_time * 1_000_000_000.0) as u64).nseconds();
+ let end_pts = ((end_time * 1_000_000_000.0) as u64).nseconds();
let duration = end_pts.saturating_sub(start_pts);
if start_pts > last_pts {
diff --git a/net/hlssink3/src/playlist.rs b/net/hlssink3/src/playlist.rs
index 671a1ca6b..60940ae84 100644
--- a/net/hlssink3/src/playlist.rs
+++ b/net/hlssink3/src/playlist.rs
@@ -93,7 +93,7 @@ impl Playlist {
}
self.playlist_index += 1;
- self.inner.media_sequence = self.playlist_index as u64 - self.inner.segments.len() as u64;
+ self.inner.media_sequence = self.playlist_index - self.inner.segments.len() as u64;
}
/// Sets the playlist to started state.
diff --git a/net/ndi/src/ndisrc/receiver.rs b/net/ndi/src/ndisrc/receiver.rs
index 8878a7944..d8d0d4476 100644
--- a/net/ndi/src/ndisrc/receiver.rs
+++ b/net/ndi/src/ndisrc/receiver.rs
@@ -915,14 +915,14 @@ impl Receiver {
real_time_now,
);
- let res_timestamp = self.0.observations_timestamp[if is_audio { 0 } else { 1 }].process(
+ let res_timestamp = self.0.observations_timestamp[usize::from(!is_audio)].process(
element,
timestamp,
receive_time,
duration,
);
- let res_timecode = self.0.observations_timecode[if is_audio { 0 } else { 1 }].process(
+ let res_timecode = self.0.observations_timecode[usize::from(!is_audio)].process(
element,
Some(timecode),
receive_time,
diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs
index fc114aa91..1640b393e 100644
--- a/net/onvif/src/onvifmetadataoverlay/imp.rs
+++ b/net/onvif/src/onvifmetadataoverlay/imp.rs
@@ -187,8 +187,8 @@ impl OnvifMetadataOverlay {
gst_video::VideoFormat::Bgra,
#[cfg(target_endian = "big")]
gst_video::VideoFormat::Argb,
- total_width as u32,
- total_height as u32,
+ total_width,
+ total_height,
)
.ok()?;
diff --git a/net/raptorq/src/raptorqenc/imp.rs b/net/raptorq/src/raptorqenc/imp.rs
index 85faad787..b453c3969 100644
--- a/net/raptorq/src/raptorqenc/imp.rs
+++ b/net/raptorq/src/raptorqenc/imp.rs
@@ -421,7 +421,7 @@ impl RaptorqEnc {
assert_eq!(state.packets.len(), state.seqnums.len());
- if state.packets.len() == state.protected_packets_num as usize {
+ if state.packets.len() == state.protected_packets_num {
// We use current buffer timing as a base for repair packets timestamps
let now_pts = buffer.pts();
let now_dts = buffer.dts_or_pts();
diff --git a/net/rtp/src/av1/depay/imp.rs b/net/rtp/src/av1/depay/imp.rs
index 83e1a23e4..88b26fce7 100644
--- a/net/rtp/src/av1/depay/imp.rs
+++ b/net/rtp/src/av1/depay/imp.rs
@@ -370,12 +370,12 @@ impl RTPAv1Depay {
let mut bitreader = BitReader::endian(reader, ENDIANNESS);
parse_leb128(&mut bitreader)
.map_err(err_opt!(self, leb_read))
- .ok()? as u32
+ .ok()?
}
} else {
element_size = parse_leb128(&mut BitReader::endian(&mut *reader, ENDIANNESS))
.map_err(err_opt!(self, leb_read))
- .ok()? as u32;
+ .ok()?;
is_last_obu = match rtp
.payload_size()
.cmp(&(reader.position() as u32 + element_size))
diff --git a/net/rtp/src/av1/pay/imp.rs b/net/rtp/src/av1/pay/imp.rs
index 66e5a8740..0ec6b79b8 100644
--- a/net/rtp/src/av1/pay/imp.rs
+++ b/net/rtp/src/av1/pay/imp.rs
@@ -471,7 +471,7 @@ impl RTPAv1Pay {
state.open_obu_fragment = true;
size
} else {
- last_obu.bytes.len() as u32 - last_obu.offset as usize as u32
+ last_obu.bytes.len() as u32 - last_obu.offset as u32
};
if !packet.omit_last_size_field {
diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs
index b2fb1fd38..383216d33 100644
--- a/net/rtp/src/gcc/imp.rs
+++ b/net/rtp/src/gcc/imp.rs
@@ -397,8 +397,8 @@ impl Detector {
- self.last_received_packets.iter().next().unwrap().1.arrival;
let bits = self
.last_received_packets
- .iter()
- .map(|(_seqnum, p)| p.size as f64)
+ .values()
+ .map(|p| p.size as f64)
.sum::<f64>()
* 8.;
@@ -523,7 +523,7 @@ impl Detector {
}
}
- self.compute_loss_average(lost_packets as f64 / n_packets as f64);
+ self.compute_loss_average(lost_packets / n_packets as f64);
}
fn compute_loss_average(&mut self, loss_fraction: f64) {
@@ -828,7 +828,7 @@ impl State {
}
};
- if effective_bitrate as f64 - target_bitrate as f64 > 5. * target_bitrate / 100. {
+ if effective_bitrate as f64 - target_bitrate > 5. * target_bitrate / 100. {
gst::info!(
CAT,
"Effective rate {} >> target bitrate {} - we should avoid that \
@@ -850,16 +850,11 @@ impl State {
let threshold_on_effective_bitrate = 1.5 * effective_bitrate as f64;
let increase = f64::max(
1000.0f64,
- f64::min(
- alpha * avg_packet_size_bits,
- // Stuffing should ensure that the effective bitrate is not
- // < target bitrate, still, make sure to always increase
- // the bitrate by a minimum amount of 160.bits
- f64::max(
- threshold_on_effective_bitrate - self.target_bitrate_on_delay as f64,
- 160.,
- ),
- ),
+ // Stuffing should ensure that the effective bitrate is not
+ // < target bitrate, still, make sure to always increase
+ // the bitrate by a minimum amount of 160.bits
+ (threshold_on_effective_bitrate - self.target_bitrate_on_delay as f64)
+ .clamp(160.0, alpha * avg_packet_size_bits),
);
/* Additive increase */
@@ -1259,8 +1254,8 @@ impl ObjectImpl for BandwidthEstimator {
the element to configure the starting bitrate, in which case the
encoder should also use it as target bitrate",
1,
- u32::MAX as u32,
- DEFAULT_MIN_BITRATE as u32,
+ u32::MAX,
+ DEFAULT_MIN_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecUInt::new(
@@ -1268,7 +1263,7 @@ impl ObjectImpl for BandwidthEstimator {
"Minimal Bitrate",
"Minimal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
1,
- u32::MAX as u32,
+ u32::MAX,
DEFAULT_MIN_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
@@ -1277,7 +1272,7 @@ impl ObjectImpl for BandwidthEstimator {
"Maximal Bitrate",
"Maximal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
1,
- u32::MAX as u32,
+ u32::MAX,
DEFAULT_MAX_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs
index 64a98f4df..f499b6f94 100644
--- a/net/webrtc/src/webrtcsink/imp.rs
+++ b/net/webrtc/src/webrtcsink/imp.rs
@@ -275,7 +275,7 @@ impl Default for Settings {
cc_info: CCInfo {
heuristic: WebRTCSinkCongestionControl::GoogleCongestionControl,
min_bitrate: DEFAULT_MIN_BITRATE,
- max_bitrate: DEFAULT_MAX_BITRATE as u32,
+ max_bitrate: DEFAULT_MAX_BITRATE,
start_bitrate: DEFAULT_START_BITRATE,
},
do_fec: DEFAULT_DO_FEC,
@@ -2400,7 +2400,7 @@ impl ObjectImpl for WebRTCSink {
"Minimal Bitrate",
"Minimal bitrate to use (in bit/sec) when computing it through the congestion control algorithm",
1,
- u32::MAX as u32,
+ u32::MAX,
DEFAULT_MIN_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
@@ -2409,7 +2409,7 @@ impl ObjectImpl for WebRTCSink {
"Minimal Bitrate",
"Minimal bitrate to use (in bit/sec) when computing it through the congestion control algorithm",
1,
- u32::MAX as u32,
+ u32::MAX,
DEFAULT_MAX_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
@@ -2418,7 +2418,7 @@ impl ObjectImpl for WebRTCSink {
"Start Bitrate",
"Start bitrate to use (in bit/sec)",
1,
- u32::MAX as u32,
+ u32::MAX,
DEFAULT_START_BITRATE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
diff --git a/utils/uriplaylistbin/tests/uriplaylistbin.rs b/utils/uriplaylistbin/tests/uriplaylistbin.rs
index eaa962115..5236d5851 100644
--- a/utils/uriplaylistbin/tests/uriplaylistbin.rs
+++ b/utils/uriplaylistbin/tests/uriplaylistbin.rs
@@ -26,7 +26,7 @@ fn file_name_to_uri(name: &str) -> String {
r
};
- let url = url::Url::from_file_path(&input_path).unwrap();
+ let url = url::Url::from_file_path(input_path).unwrap();
url.to_string()
}
diff --git a/video/closedcaption/src/caption_frame.rs b/video/closedcaption/src/caption_frame.rs
index ef2f3d070..2366d8e2a 100644
--- a/video/closedcaption/src/caption_frame.rs
+++ b/video/closedcaption/src/caption_frame.rs
@@ -57,7 +57,7 @@ impl CaptionFrame {
data.as_ptr() as *mut _,
i32::from(full),
);
- data.set_len(len as usize);
+ data.set_len(len);
String::from_utf8(data).map_err(|_| Error)
}
diff --git a/video/closedcaption/src/cea608tott/imp.rs b/video/closedcaption/src/cea608tott/imp.rs
index 0222b6c21..92bd01f8c 100644
--- a/video/closedcaption/src/cea608tott/imp.rs
+++ b/video/closedcaption/src/cea608tott/imp.rs
@@ -184,7 +184,7 @@ impl Cea608ToTt {
m %= 60;
let ns = time % 1_000_000_000;
- (h as u64, m as u8, s as u8, (ns / 1_000_000) as u16)
+ (h, m as u8, s as u8, (ns / 1_000_000) as u16)
}
fn create_vtt_buffer(
diff --git a/video/closedcaption/src/jsontovtt/imp.rs b/video/closedcaption/src/jsontovtt/imp.rs
index 26d1ae3ba..5e0fb44eb 100644
--- a/video/closedcaption/src/jsontovtt/imp.rs
+++ b/video/closedcaption/src/jsontovtt/imp.rs
@@ -131,7 +131,7 @@ impl State {
m %= 60;
let ns = time % 1_000_000_000;
- (h as u64, m as u8, s as u8, (ns / 1_000_000) as u16)
+ (h, m as u8, s as u8, (ns / 1_000_000) as u16)
}
fn create_vtt_buffer(
diff --git a/video/closedcaption/src/mcc_enc/imp.rs b/video/closedcaption/src/mcc_enc/imp.rs
index 9d4762067..4524b1f06 100644
--- a/video/closedcaption/src/mcc_enc/imp.rs
+++ b/video/closedcaption/src/mcc_enc/imp.rs
@@ -103,7 +103,7 @@ impl MccEnc {
FixedOffset::east_opt(creation_date.utc_offset().as_seconds() as i32)
.and_then(|tz| {
tz.with_ymd_and_hms(
- creation_date.year() as i32,
+ creation_date.year(),
creation_date.month() as u32,
creation_date.day_of_month() as u32,
creation_date.hour() as u32,
diff --git a/video/rav1e/src/rav1enc/imp.rs b/video/rav1e/src/rav1enc/imp.rs
index 21ceec008..7a4aa9720 100644
--- a/video/rav1e/src/rav1enc/imp.rs
+++ b/video/rav1e/src/rav1enc/imp.rs
@@ -468,7 +468,7 @@ impl ObjectImpl for Rav1Enc {
}
"rdo-lookahead-frames" => {
let settings = self.settings.lock().unwrap();
- (settings.rdo_lookahead_frames as i32).to_value()
+ (settings.rdo_lookahead_frames).to_value()
}
"tune" => {
let settings = self.settings.lock().unwrap();
diff --git a/video/videofx/src/videocompare/imp.rs b/video/videofx/src/videocompare/imp.rs
index 9e1761446..508d6f3b5 100644
--- a/video/videofx/src/videocompare/imp.rs
+++ b/video/videofx/src/videocompare/imp.rs
@@ -355,7 +355,7 @@ impl VideoAggregatorImpl for VideoCompare {
let max_distance_threshold = {
let settings = self.settings.lock().unwrap();
- settings.max_distance_threshold as f64
+ settings.max_distance_threshold
};
if message