X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Fzmbvenc.rs;h=0c8b945f8fb4c716fb704bc18a527b7f8f44b673;hb=6f2630992fe340ad1a122ec10c649f756e478185;hp=c0d58fab14a1ff177051e91a906e771eb348c2ea;hpb=886cde4847280b96e10d240c2f2d76abec121dc8;p=nihav.git diff --git a/nihav-commonfmt/src/codecs/zmbvenc.rs b/nihav-commonfmt/src/codecs/zmbvenc.rs index c0d58fa..0c8b945 100644 --- a/nihav-commonfmt/src/codecs/zmbvenc.rs +++ b/nihav-commonfmt/src/codecs/zmbvenc.rs @@ -374,9 +374,10 @@ impl NAEncoder for ZMBVEncoder { 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) => { @@ -594,7 +595,7 @@ mod test { ]; //test_encoding_to_file(&dec_config, &enc_config, enc_params, enc_options); test_encoding_md5(&dec_config, &enc_config, enc_params, enc_options, - &[0x4bcdb816, 0x57d5d1b6, 0xc9412438, 0x9416c407]); + &[0x08615111, 0x6f644a35, 0xa4e28f32, 0x35d2e66c]); } #[test]