copy encoding parameters from the reference when negotiating the format
[nihav.git] / nihav-ms / src / codecs / msadpcm.rs
index de6f447068c99f81e60843182facf612c90ca993..e6e995b6d25465a72478264ff6a580648b58bdd2 100644 (file)
@@ -320,7 +320,7 @@ impl NAEncoder for MSADPCMEncoder {
                 if (outinfo.channels == 1) && ((outinfo.block_len & 1) == 1) {
                     outinfo.block_len += 1;
                 }
-                let mut ofmt = EncodeParameters::default();
+                let mut ofmt = *encinfo;
                 ofmt.format = NACodecTypeInfo::Audio(outinfo);
                 return Ok(ofmt);
             }