Repository navigation
Conversation
) `obs_parse_hevc_header()` assembles the NAL-array header byte from the `array_completeness` and `NAL_unit_type` fields and hands the `int` result to `s_w8()`, which takes a `uint8_t`. AppleClang's `-Wimplicit-int-conversion` (part of the conversion ratchet #2872 added for #2625) rejects it on the macOS lanes: rtmp-hevc.c.h:853:45: error: implicit conversion loses integer precision: 'int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] s_w8(&s, (array->array_completeness << 7) | (array->NAL_unit_type & 0x3f)); #2925 stated the two sibling bytes in this function (the profile/tier byte and the frame-rate byte); this is the third, the one the unity target `obs-outputs.hevc+.h.c` reaches after them. The cast states the truncation `s_w8()` already performed: the field widths are 1 + 6 bits, so the low byte is the only byte the record ever carried. Verified over all 65,536 `(array_completeness, NAL_unit_type)` pairs — the old expression truncated by the `uint8_t` parameter and the cast expression emit the same byte in every case. RED: `clang -fsyntax-only` of `plugins/obs-outputs/build/obs-outputs.hevc+.h.c` with the ratchet's conversion flags stops at line 853 with the diagnostic above. GREEN: the same compile is clean. Refs #2928
zackees
left a comment
There was a problem hiding this comment.
Review: this change is already on master (redundant)
The one-line cast this PR adds is already in master. 985ccf278 — "build(obs-outputs): state the mp4-mux and rtmp-hevc conversions macOS clang reports (#2921) (#2922)", merged 2026-10-29 16:03 UTC — landed the rtmp-hevc conversions, including this exact site.
Evidence from the current master:
$ git show origin/master:plugins/obs-outputs/rtmp-hevc.c.h | sed -n '853p'
s_w8(&s, (uint8_t)((array->array_completeness << 7) | (array->NAL_unit_type & 0x3f)));That is byte-for-byte what this PR's 5c65e13af writes, so after a rebase onto master the PR's diff is empty. The issue it cites, #2928, is also already closed.
Branch is behind master
baseRefOid for this PR is 985ccf278, but the branch's merge base with master is 3682bdb50 (before #2922). Compared with current master the branch is missing #2922's mp4-mux changes:
$ git diff origin/master pr2941 --stat
plugins/obs-outputs/mp4-mux.c.h | 15 +++++++--------
plugins/obs-outputs/mp4-output.c.h | 4 ++--
Nothing here changes behaviour or tests — it is purely a duplicate — but merging the branch as-is (rather than through a rebase) would undo the mp4-mux casts, so it should not be queued in this shape.
Recommendation
Close it as already fixed by #2922. If there is a remaining rtmp-hevc site that #2922 did not cover, it needs a fresh branch from current master so the diff shows what is actually left; I could not find one: all three sites in #2928 (827, 843, 853) carry the cast on master.
Unrelated: the red CEF Chromium Support check
The failure on this head is the nightly Compare the CEF pins with Chrome's extended stable step (run 40913129884, job 123586155321), not a build of this diff; it is the branch's scheduled dispatch and fails independently of the PR. Tracked by #1864 / #2418.
|
Superseded — this exact cast is already on
Nothing is lost: #2928's third byte landed there. Closing as redundant (coordinator, per docs/rust-port/coordination.md §6 — a superseded PR is closed with a link to the replacement). Rebasing onto current The |
Fixes #2928 — the last of the three HEVC configuration-record bytes.
#2925 (
6c5fd4516) landed the profile/tier byte (827) and the frame-rate byte (843) on master. The third site — the NAL-array header byte at 853 — is still there, and it is what theobs-outputs.hevc+.h.cunity target hits once those two are stated:The fix is the same shape as the other two: cast the expression at the call site. The field widths are 1 + 6 bits, so the low byte is the only byte the record ever carried;
s_w8()took auint8_tbefore and takes one now.RED
Local, master's code, the ratchet's flags, on the unity target:
→ the diagnostic above,
rc=1. (gcc -Wconversionaccepts it, which is why the Linux replay of the ratchet was green; AppleClang's-Wimplicit-int-conversionis the one that fires.)GREEN
The same command after the cast: no diagnostics,
rc=0.On the real macOS lanes,
scheduled.yamlworkflow_dispatchon this branch (40913129884) — a PR run does not select the macOS app build for aplugins/obs-outputspath, so this is the lane evidence:Build 🧱 / macOS 🍏 (arm64)rtmp-hevc.c.h(job still red — see below)Build 🧱 / macOS 🍏 (x86_64)Analyze 🔬 / macOS 🍏 (clang-analyze)The unity group
obs-outputs.hevc+.h.cnow compiles on AppleClang; the jobs' remaining diagnostics name a different file, and the lane stays red for it:Those are master's own sites in a file this PR does not touch (filed as #2942), so this PR carries the HEVC record only and does not claim the lane is green.
Behaviour: a probe over all 65,536
(array_completeness, NAL_unit_type)pairs compares the old expression truncated by theuint8_tparameter with the cast expression —differing_bytes=0.No flag, pin or target change;
test/cmocka/, the record layout and the public headers are untouched. Tiers that do not apply: no Rust unit, C test or protocol-format change.Notes
#2929 carried all three sites on 2026-10-29 and was closed; this is the one site that its landing in #2925 left behind.