X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-commonfmt%2Fsrc%2Fcodecs%2Fcinepakenc.rs;h=f10499706e70678c0bfd3f8454e331c399e1652f;hp=1c134c0e3ace2bfa4b681505b85e62e8a2865980;hb=fc74462bb783c7b1ca9220fd3e901b9510efecb0;hpb=61cab15b810434b8e62234ab5cdfcb17ec2d566d diff --git a/nihav-commonfmt/src/codecs/cinepakenc.rs b/nihav-commonfmt/src/codecs/cinepakenc.rs index 1c134c0..f104997 100644 --- a/nihav-commonfmt/src/codecs/cinepakenc.rs +++ b/nihav-commonfmt/src/codecs/cinepakenc.rs @@ -920,7 +920,7 @@ impl NAEncoder for CinepakEncoder { NACodecTypeInfo::Audio(_) => Err(EncoderError::FormatError), NACodecTypeInfo::Video(vinfo) => { let pix_fmt = if vinfo.format == GRAY_FORMAT { GRAY_FORMAT } else { YUV420_FORMAT }; - let outinfo = NAVideoInfo::new((vinfo.width + 3) & !3, (vinfo.height + 3) & !3, true, pix_fmt); + let outinfo = NAVideoInfo::new((vinfo.width + 3) & !3, (vinfo.height + 3) & !3, false, pix_fmt); let mut ofmt = *encinfo; ofmt.format = NACodecTypeInfo::Video(outinfo); Ok(ofmt) @@ -944,7 +944,7 @@ impl NAEncoder for CinepakEncoder { let out_info = NAVideoInfo::new(vinfo.width, vinfo.height, false, vinfo.format); let info = NACodecInfo::new("cinepak", NACodecTypeInfo::Video(out_info), None); - let mut stream = NAStream::new(StreamType::Video, stream_id, info, encinfo.tb_num, encinfo.tb_den); + let mut stream = NAStream::new(StreamType::Video, stream_id, info, encinfo.tb_num, encinfo.tb_den, 0); stream.set_num(stream_id as usize); let stream = stream.into_ref(); @@ -1069,7 +1069,7 @@ mod test { let mut dmx_reg = RegisteredDemuxers::new(); generic_register_all_demuxers(&mut dmx_reg); let mut dec_reg = RegisteredDecoders::new(); - generic_register_all_codecs(&mut dec_reg); + generic_register_all_decoders(&mut dec_reg); let mut mux_reg = RegisteredMuxers::new(); generic_register_all_muxers(&mut mux_reg); let mut enc_reg = RegisteredEncoders::new(); @@ -1103,6 +1103,8 @@ mod test { tb_den: 0, flags: 0, }; - test_encoding_to_file(&dec_config, &enc_config, enc_params); + //test_encoding_to_file(&dec_config, &enc_config, enc_params); + test_encoding_md5(&dec_config, &enc_config, enc_params, + &[0x1a71b529, 0x9453fe1a, 0xab2be3f5, 0x55623bab]); } }