Skip to content

Commit 73cd19f

Browse files
cfsmp3claude
andcommitted
fix(rust): Use i64 instead of c_long for Windows compatibility
On Windows, c_long is i32 while on Linux it's i64. The function ccxr_print_mstime_static expects i64, so casting to c_long caused a type mismatch error on Windows builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent d0caf23 commit 73cd19f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rust/src/avc/nal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{ccx_options, current_fps, total_frames_count, MPEG_CLOCK_FREQ};
99
use lib_ccxr::common::{AvcNalType, BitStreamRust, BitstreamError, FRAMERATES_VALUES, SLICE_TYPES};
1010
use lib_ccxr::util::log::DebugMessageFlag;
1111
use lib_ccxr::{debug, info};
12-
use std::os::raw::{c_char, c_long};
12+
use std::os::raw::c_char;
1313

1414
/// Process sequence parameter set RBSP
1515
pub fn seq_parameter_set_rbsp(
@@ -630,7 +630,7 @@ pub unsafe fn slice_header(
630630
msg_type = DebugMessageFlag::TIME;
631631
" sync_pts:{} ({:8})",
632632
std::ffi::CStr::from_ptr(ccxr_print_mstime_static(
633-
((*dec_ctx.timing).sync_pts / ((MPEG_CLOCK_FREQ as i64) / 1000i64)) as c_long,
633+
(*dec_ctx.timing).sync_pts / ((MPEG_CLOCK_FREQ as i64) / 1000i64),
634634
buf.as_mut_ptr()
635635
))
636636
.to_str()

0 commit comments

Comments
 (0)