Skip to content

[FIX] Select SAMI output for --smi - #2472

Open
harshalsp07 wants to merge 1 commit into
CCExtractor:masterfrom
harshalsp07:fix/smi-output-format
Open

harshalsp07 wants to merge 1 commit into
CCExtractor:masterfrom
harshalsp07:fix/smi-output-format

Conversation

@harshalsp07

@harshalsp07 harshalsp07 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

In raising this pull request, I confirm the following (please check boxes):

Reason for this PR:

  • This PR adds new functionality.
  • This PR fixes a bug that I have personally experienced or that a real user has reported and for which a sample exists.
  • This PR is porting code from C to Rust.

Sanity check:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • If the PR adds new functionality, I've added it to the changelog. If it's just a bug fix, I have NOT added it to the changelog.
  • I am NOT adding new C code unless it's to fix an existing, reproducible bug.

--smi and legacy -smi are accepted but select the default SRT encoder. Use the SAMI encoder for both spellings.

Reproduce with the existing SCC fixture. Sample

build/ccextractor tests/samples/scc_23_976.scc --smi -o output.smi

On master, the file starts with an SRT cue. With the fix, it starts with <SAMI> and matches --sami and --out sami.

The Rust parser test checks both the main and encoder formats. On Linux, all 9 CLI alias and encoding cases passed. The same checks found 6 failures on master.

@ccextractor-bot

Copy link
Copy Markdown
Collaborator
CCExtractor CI platform finished running the test files on windows. 172/238 tests matched the approved output:
Report Name Tests Passed
Broken 9/13
CEA-708 2/14
DVB 0/7
DVD 3/3
DVR-MS 2/2
General 26/28
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 69/86
Teletext 0/21
WTV 12/13
XDS 32/34

66 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.


Compared with the tip of master — test 9985, commit 24d1e0a:

  • 0 pass there and fail here
  • 0 fail there and pass here
  • 0 fail on both, with different output
  • 66 fail on both, byte for byte the same

Compared with the commit this branch was cut from: the same run as the tip of master (test 9985), so the comparison above already covers it.


No test changes behaviour relative to the tip of master: every failure above fails there too, byte for byte. The approved output for those tests is out of date, which is a baseline to review rather than a regression in this branch.

@cfsmp3 cfsmp3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Carlos' claude doing the first pass. Before Carlos takes a look, please address these issues.

The fix (args.sami || args.smi) and the Rust parser test are right. Please keep the PR to those two.

Please remove the CTest/Python additions (src/CMakeLists.txt block, tests/test_cli_sami_alias.py, tests/samples/cli_output.scc). Nothing in the build defines BUILD_TESTING: there is no include(CTest) or enable_testing(), and CI doesn't run ctest. So the block never runs, and the script and sample are never used. Adding a CLI test harness is a separate decision from this one-line fix. test_smi_selects_sami_output already checks both write_format and enc_cfg.write_format.

@harshalsp07
harshalsp07 force-pushed the fix/smi-output-format branch from 8d00190 to 18ca56d Compare November 24, 2026 04:21
@ccextractor-bot

Copy link
Copy Markdown
Collaborator
CCExtractor CI platform finished running the test files on linux. 171/238 tests matched the approved output:
Report Name Tests Passed
Broken 9/13
CEA-708 2/14
DVB 0/7
DVD 3/3
DVR-MS 2/2
General 26/28
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 68/86
Teletext 0/21
WTV 12/13
XDS 32/34

67 tests do not match the approved output. That is the pass/fail verdict. Whether this branch caused it is a separate question, answered below.


Compared with the tip of master — test 10124, commit 034fdbc:

  • 0 pass there and fail here
  • 0 fail there and pass here
  • 0 fail on both, with different output
  • 67 fail on both, byte for byte the same

Compared with the commit this branch was cut from: the same run as the tip of master (test 10124), so the comparison above already covers it.


No test changes behaviour relative to the tip of master: every failure above fails there too, byte for byte. The approved output for those tests is out of date, which is a baseline to review rather than a regression in this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants