mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-23 12:01:01 +00:00
claxondec: Fix/silence a few clippy warnings
This commit is contained in:
parent
1ad4e39cc9
commit
5047ed480d
1 changed files with 17 additions and 18 deletions
|
@ -146,8 +146,7 @@ impl AudioDecoderImpl for ClaxonDec {
|
||||||
|
|
||||||
if inmap[0..7] != [0x7f, b'F', b'L', b'A', b'C', 0x01, 0x00] {
|
if inmap[0..7] != [0x7f, b'F', b'L', b'A', b'C', 0x01, 0x00] {
|
||||||
gst_debug!(self.cat, obj: element, "Unknown streamheader format");
|
gst_debug!(self.cat, obj: element, "Unknown streamheader format");
|
||||||
} else {
|
} else if let Ok(tstreaminfo) = get_claxon_streaminfo(&inmap[13..]) {
|
||||||
if let Ok(tstreaminfo) = get_claxon_streaminfo(&inmap[13..]) {
|
|
||||||
if let Ok(taudio_info) = get_gstaudioinfo(tstreaminfo) {
|
if let Ok(taudio_info) = get_gstaudioinfo(tstreaminfo) {
|
||||||
// To speed up negotiation
|
// To speed up negotiation
|
||||||
if element.set_output_format(&taudio_info).is_err()
|
if element.set_output_format(&taudio_info).is_err()
|
||||||
|
@ -167,7 +166,6 @@ impl AudioDecoderImpl for ClaxonDec {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let mut state_guard = self.state.borrow_mut();
|
let mut state_guard = self.state.borrow_mut();
|
||||||
*state_guard = Some(State {
|
*state_guard = Some(State {
|
||||||
|
@ -178,6 +176,7 @@ impl AudioDecoderImpl for ClaxonDec {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::verbose_bit_mask)]
|
||||||
fn handle_frame(
|
fn handle_frame(
|
||||||
&self,
|
&self,
|
||||||
element: &gst_audio::AudioDecoder,
|
element: &gst_audio::AudioDecoder,
|
||||||
|
@ -309,8 +308,8 @@ impl ClaxonDec {
|
||||||
let mut v: Vec<i32> = vec![0; result.len() as usize];
|
let mut v: Vec<i32> = vec![0; result.len() as usize];
|
||||||
|
|
||||||
for (o, i) in v.chunks_exact_mut(channels).enumerate() {
|
for (o, i) in v.chunks_exact_mut(channels).enumerate() {
|
||||||
for c in 0..channels {
|
for (c, s) in i.iter_mut().enumerate() {
|
||||||
i[c] = result.sample(c as u32, o as u32);
|
*s = result.sample(c as u32, o as u32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v
|
v
|
||||||
|
|
Loading…
Reference in a new issue