mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-21 13:39:56 +00:00
[PR #1811] [MERGED] fix(rust): correctly count and store multiple input files #2554
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?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1811
Author: @cfsmp3
Created: 12/14/2025
Status: ✅ Merged
Merged: 12/14/2025
Merged by: @cfsmp3
Base:
master← Head:fix/multi-file-processing📝 Commits (1)
075ae04fix(rust): correctly count and store multiple input files📊 Changes
2 files changed (+10 additions, -19 deletions)
View changed files
📝
src/rust/src/common.rs(+7 -2)📝
src/rust/src/parser.rs(+3 -17)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.