Add 18 new tests covering the FFI boundary between C and Rust code: Lifecycle tests: - ccxr_dtvcc_init creates valid context - ccxr_dtvcc_init with null returns null - ccxr_dtvcc_free with null is safe (no crash) - ccxr_dtvcc_is_active with null returns zero - Complete lifecycle test (init -> set_encoder -> process -> flush -> free) Encoder tests: - ccxr_dtvcc_set_encoder with valid context - ccxr_dtvcc_set_encoder with null context is safe Process data tests: - ccxr_dtvcc_process_data packet start sets state correctly - ccxr_dtvcc_process_data with null is safe - ccxr_dtvcc_process_data state persists across calls (key fix verification) ccxr_process_cc_data FFI entry point tests: - Returns error with null context - Returns error with null data - Returns error with zero count - Returns error with null dtvcc_rust pointer - Processes valid CEA-708 data correctly - Skips invalid CC pairs Flush tests: - ccxr_flush_active_decoders with null is safe - ccxr_flush_active_decoders with valid context These tests specifically cover the FFI gap identified where: - The Rust-enabled path (dtvcc=NULL, dtvcc_rust set) wasn't tested - Null pointer edge cases at the C→Rust boundary weren't verified - State persistence across FFI calls wasn't validated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CCExtractor
CCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.
Subtitles are important for many people. If you're learning a new language, subtitles are a great way to learn it from movies or TV shows. If you are hard of hearing, subtitles can help you better understand what's happening on the screen. We aim to make it easy to generate subtitles by using the command line tool or Windows GUI.
The official repository is (CCExtractor/ccextractor) and master being the most stable branch.
Features
- Extract subtitles in real-time
- Translate subtitles
- Extract closed captions from DVDs
- Convert closed captions to subtitles
Programming Languages & Technologies
The core functionality is written in C. Other languages used include C++ and Python.
Installation and Usage
Downloads for precompiled binaries and source code can be found on our website.
Windows Package Managers
WinGet:
winget install CCExtractor.CCExtractor
Chocolatey:
choco install ccextractor
Scoop:
scoop bucket add extras
scoop install ccextractor
Extracting subtitles is relatively simple. Just run the following command:
ccextractor <input>
This will extract the subtitles.
More usage information can be found on our website:
You can also find the list of parameters and their brief description by running ccextractor without any arguments.
You can find sample files on our website to test the software.
Compiling CCExtractor
To learn more about how to compile and build CCExtractor for your platform check the compilation guide.
Support
By far the best way to get support is by opening an issue at our issue tracker.
When you create a new issue, please fill in the needed details in the provided template. That makes it easier for us to help you more efficiently.
If you have a question or a problem you can also contact us by email or chat with the team in Slack.
If you want to contribute to CCExtractor but can't submit some code patches or issues or video samples, you can also donate to us
Contributing
You can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository. We have some rules, outlined in the contributor's guide.
News & Other Information
News about releases and modifications to the code can be found in the CHANGES.TXT file.
For more information visit the CCExtractor website: https://www.ccextractor.org
License
GNU General Public License version 2.0 (GPL-2.0)