[BUG] + file-sequence expansion picks the digit in the extension (clip001.mp4+ only processes clip001.mp4)

オープン 初心者向け
#2,478 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 7 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

バグは add_file_sequence にあり、src/rust/src/parser.rs 内で拡張子を含むファイル名全体の中で最後の数字を選んでしまいます。issue の2ファイルの clip001.mp4+ ケースと vid001.mov+ の対照ケースで再現し、どの数字が選ばれるかを確認してください。完了とは、clip001.mp4+ が番号付きのすべてのファイルに展開され、最後の . より前の数字だけがインクリメントされることです。開始前に PR #2456 がこの数字選択のコードを変更していないことを確認し、まずメンテナーと方針を確認してください。

索引モデルが issue の本文から書いたものです。

説明

When an input name ends in +, add_file_sequence in src/rust/src/parser.rs is meant to expand a numbered sequence (clip001.mp4+ -> clip001.mp4, clip002.mp4, ...). It looks for the last digit anywhere in the filename, including the extension. For names like .mp4, .mp3, .m4a or .mp2, it picks the digit in the extension instead of the sequence number. It then searches for clip001.mp5, doesn't find it, and silently stops after the first file.

Steps to reproduce

  1. ffmpeg -f lavfi -i testsrc=duration=2:size=320x240:rate=25 -pix_fmt yuv420p clip001.mp4 && cp clip001.mp4 clip002.mp4
  2. ccextractor clip001.mp4+

Expected

Both clip001.mp4 and clip002.mp4 are processed, the same as ccextractor clip001.mp4 clip002.mp4.

Actual

Only clip001.mp4 is processed. The output shows Input: clip001.mp4, the exit code is 0, and there is no message about the missing sequence.

Control

ccextractor vid001.mov+ (with vid001.mov, vid002.mov, vid003.mov) correctly expands to all three files, so the expansion works when the extension has no digit.

Environment

  • Ubuntu, Linux 7.0.0-44
  • CCExtractor 0.96.5, built from commit 77daaddb (master)
  • Build: cmake src -DCMAKE_BUILD_TYPE=Release && make
  • Rust 1.99.1, GPAC 2.4.0 built from source

Related

#2402 (overflow panic on numbers above i32::MAX), #2456 (open PR for #2402) and #2403 (closed, unmerged). This issue is not the overflow bug. I read the full diffs of #2456 and #2403, and neither one touches the code that chooses which digits to increment, so as written they would not fix this. This report is about which digits are chosen, not how large the number can be. I searched upstream issues and PRs for "file sequence", "add_file_sequence", "sequence expansion" and "extension digit" and found no existing report of it.

Possible fix

Search for digits only before the last ., so the extension is ignored. I'm happy to work on this once the maintainers confirm, and can coordinate with #2456 since it...

主要言語
C
スター
919
フォーク
604
平均マージ
13日 12時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CCExtractor/ccextractor のほかの issue

CCExtractor/ccextractor の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。