mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1873] fix(windows): Fix c_long ABI mismatch causing Windows CI failures #2651
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/1873
State: closed
Merged: Yes
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