mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[ANALYSIS] current_fps initialization complexity - potential refactoring needed? #860
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?
Originally created by @Harshdhall01 on GitHub (Dec 25, 2025).
Description:
While investigating the TODO at
src/lib_ccx/ccx_common_timing.c:22, I discovered that the issue is more complex than the comment suggests.Current TODO:
What I Found:
I traced all usages of
current_fpsand found it's used in 40+ locations across the codebase:src/lib_ccx/)src/rust/)Actual Behavior:
current_fpsis:avc_functions.c:888- from H.264/AVC timing parametersavc_functions.c:988- fromframerates_values[]arrayes_functions.c:442- fromframerates_values[]arrayThe Real Issue:
The TODO comment is misleading. The variable does get values from
framerates_values[]during runtime. The actual issues are:framerates_values[4]instead of the hardcoded calculation?Why This Matters:
current_fpsaffects timing calculations throughout the codebase:Incorrect FPS handling could cause subtitle sync issues.
Questions for Maintainers:
Proposed Solutions:
framerates_values[4]but keep global designWhat's the preferred approach?
@cfsmp3 commented on GitHub (Dec 26, 2025):
Damn, we can use AI too :-)
For now we want to tackle existing real issues (reported by users) and complete the transition to Rust.