mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-28 00:50:11 +00:00
[PR #1818] fix: Enable stdout output for CEA-708 captions on Windows #2564
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/1818
State: closed
Merged: Yes
Summary
Fixes #1693 - ccextractorwinfull.exe can't print captions to stdout
The CEA-708 decoder crashed on Windows when using
--stdoutbecause thedtvcc_writerwas not properly initialized for stdout output.Changes
Fixed Windows stdout handle initialization (
ccx_encoders_common.c):GetStdHandle(STD_OUTPUT_HANDLE)instead ofNULLforfhandleChanged env_logger target from Stdout to Stderr (
lib.rs):--stdoutRemoved redundant debug statement (
service_decoder.rs):debug!("{}", self.current_window)was noisy and duplicated by a more detailed debug statement below itTest plan
test_writer_output_with_valid_fd- verifies stdout mode works when fd is pre-settest_writer_output_missing_filename_and_fd- verifies proper error handling (not panic)GetStdHandle(STD_OUTPUT_HANDLE)API🤖 Generated with Claude Code