-
Notifications
You must be signed in to change notification settings - Fork 543
[FIX]Fix panic when using --mp4/--mkv without explicit input format #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Previously: set_input_format() was called conditionally through a guard in parse_parameters(), meaning it was skipped during most normal (autodetection) runs. Additionally, the fatal! fallback inside set_input_format() would terminate execution if no explicit format matched, preventing autodetection from taking place. This caused unintended behavior: Normal runs could bypass initialization logic. If triggered without a matching format, the function would exit instead of allowing autodetection. Final Fix Removed the fatal! fallback so that when no explicit format flag matches, the function simply returns and preserves autodetection behavior. Removed the guard in parse_parameters() so that set_input_format() is always called as part of initialization. Explicit handling for --mp4 and --mkv remains intact. The unsafe unwrap() has been eliminated. |
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit dd29311...:
Your PR breaks these cases:
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 dd29311...:
Your PR breaks these cases:
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. |
[FIX]Fix panic when using --mp4/--mkv without explicit input format
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Found a issue --
if the user use --mp4 ya --mkv with invalid / broken file ,then the programs gets crashes instead of handling that with error message .
it is happeing because of the unwrap() METHOD
command used for reproduce the issue
FIX -- (src/rust/src/parser.rs)
and added flags rgs.mp4 and args.mkv in the set_input_format function
replace unwrap with map with closures.
After the fix, the program no longer crashes