diff --git a/src/rust/src/parser.rs b/src/rust/src/parser.rs index cfbf5ebc3..dce2cc7b8 100644 --- a/src/rust/src/parser.rs +++ b/src/rust/src/parser.rs @@ -225,7 +225,7 @@ impl OptionsExt for Options { if let Some(out_format) = args.out { self.set_output_format_type(out_format); - } else if args.sami { + } else if args.sami || args.smi { self.set_output_format_type(OutFormat::Sami); } else if args.webvtt { self.set_output_format_type(OutFormat::Webvtt); @@ -1787,6 +1787,14 @@ pub mod tests { assert_eq!(options.write_format, OutputFormat::Srt); } + #[test] + fn test_smi_selects_sami_output() { + let (options, _) = parse_args(&["--smi"]); + assert_eq!(options.write_format, OutputFormat::Sami); + assert_eq!(options.enc_cfg.write_format, OutputFormat::Sami); + assert!(options.write_format_rewritten); + } + #[test] fn test_out_ass_sets_ssa_format() { let (options, _) = parse_args(&["--out", "ass"]);