mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
[PR #1923] [MERGED] fix(mp4): Use fixed-width integer types in bswap functions #2719
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/1923
Author: @cfsmp3
Created: 12/29/2025
Status: ✅ Merged
Merged: 12/29/2025
Merged by: @cfsmp3
Base:
master← Head:fix/bswap32-windows-type-consistency📝 Commits (1)
69b7f9ffix(mp4): Use fixed-width integer types in bswap functions📊 Changes
1 file changed (+9 additions, -7 deletions)
View changed files
📝
src/lib_ccx/mp4.c(+9 -7)📄 Description
Summary
bswap16andbswap32to useint16_tandint32_tinstead ofshortandlongProblem
On Windows x64,
longis 4 bytes (LLP64 model), while on Linux x64longis 8 bytes (LP64 model). This type size difference in thebswap32function could cause inconsistent behavior when parsing NAL unit lengths in MP4/MOV files.When reading NAL lengths with
*(long *)&s->data[i]:This could potentially affect timestamp calculations and cause the timing differences observed between Windows and Linux CI tests.
Changes
bswap16shortint16_tbswap32longint32_tAll call sites in
process_avc_sample()andprocess_hevc_sample()updated accordingly.Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.