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/1793
Author: @VyankateshD206
Created: 12/12/2025
Status: ❌ Closed
Base:
master← Head:fix-empty-output-files-issue-1282📝 Commits (7)
d171ad4Fix #1282: Implement deferred file creation to prevent empty output files763f824Fix: Broken and DVB issues049e970Merge branch 'master' into fix-empty-output-files-issue-1282c199d4cFix XDS data writing - ensure file opened before writing XDS content3869b0fFix SAMI encoder - add missing header writes to stringz and buffer functions6b79eb5Fix transcript and DVDRAW encoders - add missing header writes22838e0Fix transcript encoder - defer header write until after data validation📊 Changes
11 files changed (+195 additions, -14 deletions)
View changed files
📝
src/lib_ccx/ccx_encoders_common.c(+41 -2)📝
src/lib_ccx/ccx_encoders_common.h(+1 -0)📝
src/lib_ccx/ccx_encoders_sami.c(+12 -0)📝
src/lib_ccx/ccx_encoders_smptett.c(+12 -0)📝
src/lib_ccx/ccx_encoders_srt.c(+12 -0)📝
src/lib_ccx/ccx_encoders_ssa.c(+12 -0)📝
src/lib_ccx/ccx_encoders_structs.h(+1 -0)📝
src/lib_ccx/ccx_encoders_transcript.c(+14 -0)📝
src/lib_ccx/ccx_encoders_webvtt.c(+12 -0)📝
src/lib_ccx/lib_ccx.h(+1 -0)📝
src/lib_ccx/output.c(+77 -12)📄 Description
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.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.