[FIX] transcript: suppress spurious blank lines from write_cc_line_as_transcript2 - #2324
[FIX] transcript: suppress spurious blank lines from write_cc_line_as_transcript2#2324x15sr71 wants to merge 1 commit into
Conversation
… suppress spurious blank lines
|
The |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 128175e...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 128175e...:
NOTE: The following tests have been failing on the master branch as well as the PR:
This PR does not introduce any new test failures. However, some tests are failing on both master and this PR (see above). Check the result page for more info. |
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions:
Run with
--autoprogram --out=ttxt --latin1on any sample with a pop-on → roll-up mode transition. The output contains one or more spurious blank lines not present in the reference file. Confirmed on the sample platform via RT41, RT84, RT11, RT29, RT30.Issue:
write_cc_buffer_as_transcript2emits spurious blank lines in--out=ttxt outputon samples with pop-on → roll-up transitions.Root cause:
Introduced in PR #2105 - it refactored
write_cc_buffer_as_transcript2to emitencoded_end_frameafter each block, and changed the call to:Because
write_cc_line_as_transcript2returned void, the caller couldn't know it wrote nothing (blank cursor row).wrote_somethinggot set to 1 anyway, so a bare newline was emitted for every empty row.Fix:
Change
write_cc_line_as_transcript2from void to int (returns 1 if content was written, 0 if not) and use|=in the caller:wrote_something |= write_cc_line_as_transcript2(data, context, i);encoded_end_frameis now only written when at least one line produced output.Testing:
01509...ts,--out=ttxt --latin1): two spurious blank lines removed. Output is byte-identical to accepted variant ref9f139b8c...