Fix clippy warnings (#251)
This commit is contained in:
@@ -178,10 +178,10 @@ impl DriverTestHandle {
|
|||||||
OutputPacket::Rtp(p) => eprintln!("pkt: RTP[{}B]", p.len()),
|
OutputPacket::Rtp(p) => eprintln!("pkt: RTP[{}B]", p.len()),
|
||||||
OutputPacket::Raw(OutputMessage::Silent) => eprintln!("pkt: Raw-Silent"),
|
OutputPacket::Raw(OutputMessage::Silent) => eprintln!("pkt: Raw-Silent"),
|
||||||
OutputPacket::Raw(OutputMessage::Passthrough(p)) => {
|
OutputPacket::Raw(OutputMessage::Passthrough(p)) => {
|
||||||
eprintln!("pkt: Raw-Passthrough[{}B]", p.len())
|
eprintln!("pkt: Raw-Passthrough[{}B]", p.len());
|
||||||
},
|
},
|
||||||
OutputPacket::Raw(OutputMessage::Mixed(p)) => {
|
OutputPacket::Raw(OutputMessage::Mixed(p)) => {
|
||||||
eprintln!("pkt: Raw-Mixed[{}B]", p.len())
|
eprintln!("pkt: Raw-Mixed[{}B]", p.len());
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use super::*;
|
|||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
/// Telemetry/statistics packet, received from another stream (detailed in `packet`).
|
/// Telemetry/statistics packet, received from another stream
|
||||||
|
///
|
||||||
/// `payload_offset` contains the true payload location within the raw packet's `payload()`,
|
/// `payload_offset` contains the true payload location within the raw packet's `payload()`,
|
||||||
/// to allow manual decoding of `Rtcp` packet bodies.
|
/// to allow manual decoding of `Rtcp` packet bodies.
|
||||||
pub struct RtcpData {
|
pub struct RtcpData {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use super::*;
|
|||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
/// Opus audio packet, received from another stream (detailed in `packet`).
|
/// Opus audio packet, received from another stream
|
||||||
|
///
|
||||||
/// `payload_offset` contains the true payload location within the raw packet's `payload()`,
|
/// `payload_offset` contains the true payload location within the raw packet's `payload()`,
|
||||||
/// if extensions or raw packet data are required.
|
/// if extensions or raw packet data are required.
|
||||||
pub struct RtpData {
|
pub struct RtpData {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ impl OpusDecoder {
|
|||||||
Err(OpusError::Opus(ErrorCode::BufferTooSmall)) => {
|
Err(OpusError::Opus(ErrorCode::BufferTooSmall)) => {
|
||||||
// double the buffer size
|
// double the buffer size
|
||||||
// correct behav would be to mirror the decoder logic in the udp_rx set.
|
// correct behav would be to mirror the decoder logic in the udp_rx set.
|
||||||
let new_size = (self.rawbuf.len() * 2).min(std::i32::MAX as usize);
|
let new_size = (self.rawbuf.len() * 2).min(i32::MAX as usize);
|
||||||
if new_size == self.rawbuf.len() {
|
if new_size == self.rawbuf.len() {
|
||||||
return decode_error("Opus frame too big: cannot expand opus frame decode buffer any further.");
|
return decode_error("Opus frame too big: cannot expand opus frame decode buffer any further.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user