X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Fcinepakenc.rs;h=604bc87400e8386f7b83bf5223c3cbb4e0d38bb8;hp=3269cf8ea7ef7de5fb111cdc5bce516b36306acc;hb=6f2630992fe340ad1a122ec10c649f756e478185;hpb=f44bddc9b5520507c7571b89763de668238d790a diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index 3269cf8..604bc87 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -925,9 +925,10 @@ impl NAEncoder for CinepakEncoder { fn negotiate_format(&self, encinfo: &EncodeParameters) -> EncoderResult { match encinfo.format { NACodecTypeInfo::None => { - let mut ofmt = EncodeParameters::default(); - ofmt.format = NACodecTypeInfo::Video(NAVideoInfo::new(0, 0, true, YUV420_FORMAT)); - Ok(ofmt) + Ok(EncodeParameters { + format: NACodecTypeInfo::Video(NAVideoInfo::new(0, 0, true, YUV420_FORMAT)), + ..Default::default() + }) }, NACodecTypeInfo::Audio(_) => Err(EncoderError::FormatError), NACodecTypeInfo::Video(vinfo) => {