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
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-12-22 17:40:18 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-12-22 17:40:18 +0300
commit1ef47cb48e9eab22031298b288ce451506be3a33 (patch)
tree3cada774cf49a25e676999acaeea8ec5576c3b4d
parent79b8610fbe35b9e3af9fe935872305c892b7809b (diff)
Fix a few new clippy 1.75 warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1415>
-rw-r--r--mux/fmp4/src/fmp4mux/boxes.rs2
-rw-r--r--mux/fmp4/src/fmp4mux/imp.rs4
-rw-r--r--mux/mp4/src/mp4mux/boxes.rs2
-rw-r--r--mux/mp4/src/mp4mux/imp.rs2
-rw-r--r--utils/uriplaylistbin/src/uriplaylistbin/imp.rs2
-rw-r--r--video/videofx/src/videocompare/mod.rs2
6 files changed, 7 insertions, 7 deletions
diff --git a/mux/fmp4/src/fmp4mux/boxes.rs b/mux/fmp4/src/fmp4mux/boxes.rs
index 9d84158e..55c8c520 100644
--- a/mux/fmp4/src/fmp4mux/boxes.rs
+++ b/mux/fmp4/src/fmp4mux/boxes.rs
@@ -1474,7 +1474,7 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
.unwrap()
.get::<gst::ArrayRef>("streamheader")
.ok()
- .and_then(|a| a.get(0).and_then(|v| v.get::<gst::Buffer>().ok()))
+ .and_then(|a| a.first().and_then(|v| v.get::<gst::Buffer>().ok()))
{
(
rate,
diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs
index 98b8843d..fc941468 100644
--- a/mux/fmp4/src/fmp4mux/imp.rs
+++ b/mux/fmp4/src/fmp4mux/imp.rs
@@ -2408,7 +2408,7 @@ impl FMP4Mux {
if let Some(super::FragmentHeaderStream {
start_time: Some(start_time),
..
- }) = streams.get(0)
+ }) = streams.first()
{
state.fragment_offsets.push(super::FragmentOffset {
time: *start_time,
@@ -2587,7 +2587,7 @@ impl FMP4Mux {
if let Some(header) = s
.get::<gst::ArrayRef>("streamheader")
.ok()
- .and_then(|a| a.get(0).and_then(|v| v.get::<gst::Buffer>().ok()))
+ .and_then(|a| a.first().and_then(|v| v.get::<gst::Buffer>().ok()))
{
if gst_pbutils::codec_utils_opus_parse_header(&header, None).is_err() {
gst::error!(CAT, obj: pad, "Received invalid Opus header");
diff --git a/mux/mp4/src/mp4mux/boxes.rs b/mux/mp4/src/mp4mux/boxes.rs
index c1fa7791..4e2188b0 100644
--- a/mux/mp4/src/mp4mux/boxes.rs
+++ b/mux/mp4/src/mp4mux/boxes.rs
@@ -1291,7 +1291,7 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
.unwrap()
.get::<gst::ArrayRef>("streamheader")
.ok()
- .and_then(|a| a.get(0).and_then(|v| v.get::<gst::Buffer>().ok()))
+ .and_then(|a| a.first().and_then(|v| v.get::<gst::Buffer>().ok()))
{
(
rate,
diff --git a/mux/mp4/src/mp4mux/imp.rs b/mux/mp4/src/mp4mux/imp.rs
index eb35b643..6ea81c19 100644
--- a/mux/mp4/src/mp4mux/imp.rs
+++ b/mux/mp4/src/mp4mux/imp.rs
@@ -902,7 +902,7 @@ impl MP4Mux {
if let Some(header) = s
.get::<gst::ArrayRef>("streamheader")
.ok()
- .and_then(|a| a.get(0).and_then(|v| v.get::<gst::Buffer>().ok()))
+ .and_then(|a| a.first().and_then(|v| v.get::<gst::Buffer>().ok()))
{
if gst_pbutils::codec_utils_opus_parse_header(&header, None).is_err() {
gst::error!(CAT, obj: pad, "Received invalid Opus header");
diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
index 3aefa25c..38e9a93f 100644
--- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
+++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs
@@ -1647,7 +1647,7 @@ impl UriPlaylistBin {
if let Some(state) = state_guard.as_mut() {
// first streaming item is the one actually being played
- if let Some(current) = state.streaming.get(0) {
+ if let Some(current) = state.streaming.first() {
let (mut current_iteration, current_uri_index) = (
(current.index() / uris_len) as u32,
(current.index() % uris_len) as u64,
diff --git a/video/videofx/src/videocompare/mod.rs b/video/videofx/src/videocompare/mod.rs
index bfbbef37..a1c0800a 100644
--- a/video/videofx/src/videocompare/mod.rs
+++ b/video/videofx/src/videocompare/mod.rs
@@ -252,7 +252,7 @@ mod test {
let message: VideoCompareMessage = structure.try_into().unwrap();
assert_eq!(message.running_time, Some(running_time));
- let pad_distance = message.pad_distances.get(0).unwrap();
+ let pad_distance = message.pad_distances.first().unwrap();
assert_eq!(pad_distance.pad.name().as_str(), "sink_0");
assert_eq!(pad_distance.distance, 42f64);
}