aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-flash/src/codecs/adpcmenc.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2022-09-22 17:53:58 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2022-09-22 17:53:58 +0200
commit6f2630992fe340ad1a122ec10c649f756e478185 (patch)
treec8c95d46546cd71e2cd5e15faef02ca9acd2b70b /nihav-flash/src/codecs/adpcmenc.rs
parentf44bddc9b5520507c7571b89763de668238d790a (diff)
downloadnihav-6f2630992fe340ad1a122ec10c649f756e478185.tar.gz
fix some clippy warnings
Diffstat (limited to 'nihav-flash/src/codecs/adpcmenc.rs')
-rw-r--r--nihav-flash/src/codecs/adpcmenc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/nihav-flash/src/codecs/adpcmenc.rs b/nihav-flash/src/codecs/adpcmenc.rs
index 92a292b..9cd04f7 100644
--- a/nihav-flash/src/codecs/adpcmenc.rs
+++ b/nihav-flash/src/codecs/adpcmenc.rs
@@ -63,9 +63,9 @@ impl NAEncoder for ADPCMEncoder {
fn negotiate_format(&self, encinfo: &EncodeParameters) -> EncoderResult<EncodeParameters> {
match encinfo.format {
NACodecTypeInfo::None => {
- let mut ofmt = EncodeParameters::default();
- ofmt.format = NACodecTypeInfo::Audio(NAAudioInfo::new(0, 1, SND_S16_FORMAT, BLOCK_LEN));
- Ok(ofmt)
+ Ok(EncodeParameters {
+ format: NACodecTypeInfo::Audio(NAAudioInfo::new(0, 1, SND_S16_FORMAT, BLOCK_LEN)),
+ ..Default::default() })
},
NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError),
NACodecTypeInfo::Audio(ainfo) => {