Repository navigation
fix: preserve leading zeros in customtxt - #2514
Open
hemanthGavara2007 wants to merge 1 commit into
Open
hemanthGavara2007 wants to merge 1 commit into
hemanthGavara2007 wants to merge 1 commit into
Conversation
Collaborator
CCExtractor CI platform finished running the test files on linux. 171/238 tests matched the approved output:
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 10180, commit 2c1c1c6:
Compared with the commit this branch was cut from: the same run as the tip of master (test 10180), 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[FIX] Preserve leading zeros in --customtxt argument
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Bug description
The
--customtxtargument was defined asOption<u32>. When a value containing leading zeros was parsed, the zeros were discarded during integer conversion.For example,
0000101became101, causing the existing seven-character validation to reject the value.Reproduction instructions
Build CCExtractor on macOS.
Run the following command with a valid local video file:
./mac/ccextractor --customtxt 0000101 "/path/to/video.mp4"Previously, the leading zeros were lost during integer parsing, causing the seven-character validation to fail.
With this fix, the value is preserved as a string and passes the seven-character validation.
Additional validation:
./mac/ccextractor --customtxt 123456 "/path/to/video.mp4"This is correctly rejected with:
Changes made
customtxtfromOption<u32>toOption<String>.