mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1974] [MERGED] fix(rust): Flush stdout after print to fix stream mode display #2772
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/1974
Author: @cfsmp3
Created: 1/2/2026
Status: ✅ Merged
Merged: 1/3/2026
Merged by: @cfsmp3
Base:
master← Head:fix/stream-mode-display-flush📝 Commits (1)
ad971f0fix(rust): Flush stdout after print to fix stream mode display📊 Changes
1 file changed (+10 additions, -2 deletions)
View changed files
📝
src/rust/lib_ccxr/src/util/log.rs(+10 -2)📄 Description
Summary
[Stream mode: ]display when using--input <format>optionsProblem
When using
--input scc(or other formats), the startup output showed:Instead of:
Root Cause
The Rust logger's
print()function usesprint!()which doesn't automatically flush stdout. When mixing C and Rust code that both write to stdout, the Rust output was getting buffered and not appearing before the C code continued writing.Solution
Added explicit
std::io::stdout().flush()after eachprint!()call to ensure output appears immediately and interleaves correctly with C code.Test plan
--input sccshows[Stream mode: SCC]--input mkvshows[Stream mode: MKV]--input tsshows[Stream mode: Transport][Stream mode: Autodetect]🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.