mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
[PR #1873] [MERGED] fix(windows): Fix c_long ABI mismatch causing Windows CI failures #2647
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/1873
Author: @cfsmp3
Created: 12/21/2025
Status: ✅ Merged
Merged: 12/21/2025
Merged by: @cfsmp3
Base:
master← Head:fix/windows-c_long-abi-mismatch📝 Commits (3)
2c67381fix(windows): Fix c_long ABI mismatch in demuxer.rs9e19c58refactor: Replace platform-dependent 'long' with 'int64_t'5458370refactor: Replace c_longlong with i64 for consistency📊 Changes
9 files changed (+22 additions, -22 deletions)
View changed files
📝
src/lib_ccx/asf_constants.h(+1 -1)📝
src/lib_ccx/avc_functions.h(+6 -6)📝
src/lib_ccx/ccx_decoders_608.h(+1 -1)📝
src/lib_ccx/ccx_demuxer.h(+2 -2)📝
src/lib_ccx/file_functions.c(+1 -1)📝
src/lib_ccx/lib_ccx.h(+2 -2)📝
src/lib_ccx/ts_functions.c(+1 -1)📝
src/rust/src/common.rs(+3 -3)📝
src/rust/src/libccxr_exports/demuxer.rs(+5 -5)📄 Description
Summary
Fixes Windows-specific CI test failures caused by platform-dependent type issues in the C/Rust FFI layer.
Problem
The C type
longhas different sizes on different platforms:This caused ABI mismatches when interfacing with Rust, since Rust's
c_longmatches the platform'slongsize.Changes
1. Fix ABI mismatch in demuxer.rs (Commit 1)
The extern declaration for
ccxr_add_current_ptsusedc_long, but the actual implementation usesi64:2. Replace all
longwithint64_tin C code (Commit 2)Changed the following fields from
longtoint64_t:asf_constants.hparsebufsizeavc_functions.hcc_databufsize,num_nal_unit_type_7,num_vcl_hrd,num_nal_hrd,num_jump_in_frames,num_unexpected_sei_lengthccx_decoders_608.hbytes_processed_608ccx_demuxer.hcapbufsize,capbuflenlib_ccx.hts_readstream()return type,FILEBUFFERSIZEAlso updated Rust code in
common.rsto removec_longcasts (bindgen will now generatei64for these fields).Expected Impact
Should fix Windows-specific failures in:
Test Plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.