fix: changed some config behaviour.

This commit is contained in:
Didier Slof 2023-05-08 10:27:06 +02:00
parent ea076dcf72
commit fe55238b10
Signed by: didier
GPG key ID: 01E71F18AA4398E5
6 changed files with 39 additions and 52 deletions

View file

@ -17,10 +17,9 @@ impl TranscodeJob {
}
pub fn build_command(&self, ffmpeg_config: &ConfigFFmpeg) -> Command {
let options = ffmpeg_config.build_command_options(&self.input, &self.output);
let mut command = Command::new("ffmpeg");
command.args(options.to_args());
command
ffmpeg_config
.build_command_options(&self.input, &self.output)
.to_command(&ffmpeg_config.path)
}
pub fn check_if_exists(&self) -> bool {
@ -28,6 +27,7 @@ impl TranscodeJob {
}
pub fn run(&self, ffmpeg_config: &ConfigFFmpeg) -> Result<Child, error::Error> {
debug!("Running job: {:#?}", &self.input);
let mut command = self.build_command(ffmpeg_config);
match command.spawn() {
Ok(child) => Ok(child),