mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1811] fix(rust): correctly count and store multiple input files #2558
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1811
State: closed
Merged: Yes
Summary
num_input_fileswas always set to 1 regardless of how many input files were providedRoot Cause
Two bugs in the Rust argument parsing code prevented multi-file processing from working:
Bug 1: Incorrect iteration in
common.rs:216Bug 2: Wrong indexing in
parser.rs:append_file_to_queue()The function used
inputfile.len()as the index for new files, but afterresize(10, String::new()), the length becomes 10 even with only 1 file. This caused the second file to go to index 10, third to index 20, etc.Fixed by simply using
push()instead of manual index calculation.Test plan
ccextractor file1.mpg file2.mpg file3.mpg -o output.srtFixes #1810
🤖 Generated with Claude Code