mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
fix(rust): Support BCP 47 language tags in --mkvlang option
The --mkvlang option previously only supported single ISO 639-2 codes due to using a Language enum with a fixed list of variants. Extended codes (like "fre-ca") and multiple codes (like "eng,chi") would panic. This change introduces MkvLangFilter, a proper type for language filtering that: - Validates language codes per BCP 47 specification - Supports ISO 639-2 (3-letter codes like "eng") - Supports BCP 47 tags (like "en-US", "zh-Hans-CN") - Supports comma-separated multiple codes - Provides clean error messages for invalid input - Includes comprehensive unit tests The C code continues to receive the raw string for strstr() matching, maintaining backward compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Fix: Prevent infinite loop on truncated MKV files
|
||||
- Fix: Various memory safety and stability fixes in demuxers (MP4, PS, MKV, DVB)
|
||||
- Fix: Delete empty output files instead of leaving 0-byte files (#1282)
|
||||
- Fix: --mkvlang now supports BCP 47 language tags (e.g., en-US, zh-Hans-CN) and multiple codes
|
||||
|
||||
0.96.5 (2026-01-05)
|
||||
-------------------
|
||||
|
||||
Reference in New Issue
Block a user