mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
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/1901
Author: @tusharbhatt7
Created: 12/25/2025
Status: ❌ Closed
Base:
master← Head:master📝 Commits (3)
44ac486Fix infinite loop by skipping junk, preserving User Data (Issue #1754)cfdb397Fix: Infinite loop on junk data (whitelisting) and H.264 regression (guarding process_m2v)728e6cdFix: Remove startcode whitelist to prevent stalls, rely on skip_u32📊 Changes
2 files changed (+40 additions, -2 deletions)
View changed files
📝
src/lib_ccx/es_functions.c(+4 -1)📝
src/lib_ccx/general_loop.c(+36 -1)📄 Description
Title: Fix infinite binary output loop for TS files with no subtitles (#1754)
Description:
Summary
This PR fixes a bug where processing certain Transport Stream (.ts) files that contain video streams but no subtitles would cause ccextractor to enter an infinite loop, continuously outputting binary data without making progress.
Related Issue
Fixes #1754
Changes
src/lib_ccx/general_loop.c
Implemented a safeguard in
process_non_multiprogram_general_loop
If the video decoder (process_m2v) returns 0 bytes consumed but the buffer still contains data (> 8 bytes), the logic now forcibly consumes the buffer.
This prevents the demuxer from getting stuck re-processing the same invalid or problematic video data indefinitely while waiting for a caption block that never arrives.
Verification
Verified using a synthetic .ts file generated to contain valid MPEG-2 Video PES headers but no subtitle data.
Before: The process would hang or output infinite binary data.
After: The process correctly identifies the video stream, finds no captions, and exits gracefully with EXIT_NO_CAPTIONS (Code 10).
Ran full build to ensure no regressions in standard general_loop behavior.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.