mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
Address Miguel's R1 blocker + Rames/Miga's testability nit: - The `-frames:v 3` decode samples AT MOST 3 frames; a legitimate 1- or 2-frame WebM (256 or 512 bytes) was returned as `undefined` (probe failure), silently skipping the advisory even when every available pixel was opaque. Accept any positive whole-frame byte count ≤ 768 (multiples of 256), distinguishing successful short-EOF from partial/ malformed decode. - Export `sampledAlphaIsFullyOpaque` and add 11 direct tests covering: 3/2/1-frame opaque decodes → true; transparent pixel at pos 0 or final byte → false (guards the alpha-byte stride); non-frame-multiple / over-3-frame / zero byte counts → undefined; execFileSync throw → undefined; findFFmpeg missing → undefined; and one args-shape guard pinning the load-bearing `-c:v libvpx-vp9` before `-i` (without which the default decoder silently discards VP9 alpha and the whole check would false-positive on genuinely-transparent WebMs). - Update advisory wording from "3 sampled decoded frames" to "every sampled decoded pixel" so the message is honest for short WebMs. 18/18 tests pass locally under `vitest run`.