mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-17 05:25:33 +00:00
[BUG] Infinite binary output when processing .ts files with no subtitles #845
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?
Originally created by @AbHash-RixE on GitHub (Oct 8, 2025).
CCExtractor version: Version: 0.94
Necessary information
./ccextractor output_clean.ts💬 Additional information
When CCExtractor is run on a .ts file that contains no subtitles, it produces infinite binary-like output in the terminal instead of stopping gracefully.
Observed behavior
The terminal continuously floods with binary/hex-like data, for example:
Expected behavior
If the input file contains no subtitles, CCExtractor should:
Working version
Broken version
@DhanushVarma-2 commented on GitHub (Nov 10, 2025):
@AbHash-RixE I will work on identifying and fixing this bug!
Root Cause: Based on the issue description, the infinite loop likely occurs in the TS processing functions. I will investigate the ts_readstream function in src/lib_ccx/ts_functions.c to find where the do-while loop runs indefinitely when processing TS files with no subtitles.
Plan for Fix:
I will add a packet counter with a reasonable limit (e.g., 50,000 packets)
I will implement termination conditions when no subtitles are found after processing the limit
I will add proper tracking to detect when no caption data is present
I will ensure clean exit with appropriate messages instead of infinite binary output
Expected Changes:
I will modify the relevant TS processing functions to add proper termination logic
The goal is to ensure that:
TS files with no subtitles will exit cleanly after processing a reasonable number of packets
TS files with subtitles continue to work normally
No binary data floods the terminal
I will submit a PR once I have implemented and tested the fix. Could you let me know if you have any specific test files or additional information that would be helpful?
@cfsmp3 commented on GitHub (Dec 29, 2025):
I'm closing this issue - 1) No sample, 2) I suspect "infinite" here is an exaggeration and that CCExtractor would eventually end after reading the whole file. Infinite would imply that it never ends and I don't think that's the case. 3) We've removed the hex dump.