From: Kostya Shishkov Date: Sun, 12 Jul 2020 08:24:52 +0000 (+0200) Subject: use conversion when output parameters are forced X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=eb563e3dc12adb8e700adfccae02f526bf9f5606;p=nihav-encoder.git use conversion when output parameters are forced --- diff --git a/src/main.rs b/src/main.rs index 8d5efd3..5c9b8ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -410,6 +410,7 @@ impl Transcoder { return false; } let mut encoder = (enc_create.unwrap())(); + let forced_out = oopts.enc_params.format != NACodecTypeInfo::None; if oopts.enc_params.format == NACodecTypeInfo::None { oopts.enc_params.format = istr.get_info().get_properties(); } @@ -427,7 +428,7 @@ impl Transcoder { //todo check for params mismatch let cvt = match (&oopts.enc_params.format, &ret_eparams.format) { (NACodecTypeInfo::Video(svinfo), NACodecTypeInfo::Video(dvinfo)) => { - if svinfo == dvinfo { + if svinfo == dvinfo && !forced_out { OutputConvert::None } else { let ofmt = ScaleInfo { fmt: dvinfo.format, width: dvinfo.width, height: dvinfo.height };