mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +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?
Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1793
State: closed
Merged: No
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
[FIX] Prevent creation of empty per-stream subtitle files (Fixes #1282)
This pull request implements deferred output file creation to avoid producing zero-byte
.srtfiles for caption streams that contain no actual data (e.g., CC3 when using the-12option). Previously, CCExtractor would create all output files during initialization regardless of whether the stream ever produced captions, resulting in empty files such as*_2.srt.What This PR Does:
open_output_file_if_needed()to create files lazily on first write.open()calls from writer initialization.header_writtenflag to prevent duplicate header writes.