From 18ca56d6f4170ed46719a7961bad1d54c9751b4c Mon Sep 17 00:00:00 2001 From: harshalsp07 <222931229+harshalsp07@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:15:07 +0530 Subject: [PATCH] [FIX] Select SAMI output for --smi --- src/rust/src/parser.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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"]);