Skip to content

fix: the items left open after 0.71.1 (first-sample fallback, DVB budget, keyframe walk, concat subtitle offset) - #36

Merged
gravity-zero merged 11 commits into
masterfrom
fix/open-items-0.71.2
Nov 20, 2026
Merged

gravity-zero merged 11 commits into
masterfrom
fix/open-items-0.71.2

Conversation

@gravity-zero

Copy link
Copy Markdown
Owner

The items left open after 0.71.1, each reproduced by a failing test before its fix (or measured on a real file), one commit per point.

First-sample fallback (WithInBandColourFallback, -in-band, mp4.Options.InBandColour):

  • an HEVC track declared bt2020-10 is read as HLG when an Alternative Transfer Characteristics SEI of its first sample says so. Measured on x265 files: ffprobe says bt2020-10 at stream level and arib-std-b67 at frame level; a consumer comparing with the stream level will see the difference.
  • an H.264 record with no SPS (avc3) gets its profile, level, pixel format and colour from its samples: in Matroska whether or not the container states the scan type, and in a fragmented MP4 read head-only, whose first moof is now read for where the first samples are. Measured on a public browser test file in its three forms: High, level 31, yuv420p, as ffprobe.
  • an MPEG-2 track gets its profile, level and pixel format from the sequence extension (record, or first sample); a VP8 track its pixel format.

Elsewhere:

  • a DVB subtitle block fills and draws a region and one picture of it, not four planes (254 bytes of block allocated 208 MiB);
  • a keyframe walk cancelled on its way returns the cancellation, not the keyframes met so far;
  • a concatenation applies the subtitle offset, full pass and on demand (the option was accepted and ignored);
  • a test pins that the writing commands announce stray bytes ahead of the closing elements too (the "not announced" note of the previous lot was wrong).

Commits:

  • c1b2a77 - fix(mp4): a fragmented MP4 read head-only gets its first samples from the first moof for the first-sample fallback
  • 1ae242a - fix(reader): an H.264 record with no SPS is read from its samples when the container states the scan type too
  • 6b24995 - docs(changelog): the fixes since 0.71.1, and the first-sample cases the option now covers
  • ad3c348 - fix(hls): a concatenation applies the subtitle offset, full pass and on demand
  • 05c14e4 - fix(reader): a keyframe walk cancelled on its way returns the cancellation, not the keyframes met so far
  • d0dc90c - test(cli): the writing commands announce stray bytes ahead of the closing elements too
  • c02baa2 - fix(subtitle): a DVB block fills and draws a region and one picture of it, not four planes
  • b379d6f - fix(reader): an MPEG-2 track gets its profile, level and pixel format from the sequence extension, a VP8 track its pixel format
  • 773b921 - fix(reader): an HEVC track declared bt2020-10 is read as HLG when a transfer SEI of its first sample says so
  • 2e15297 - fix(reader): an H.264 record with no SPS gets its profile, pixel format and colour from the SPS its samples carry

Checks, on c1b2a77:

  • make preflight RELEASE=v0.71.2 exit 0 in a container (gorelease asks for v0.71.2);
  • the downstream consumer's suite against it and against v0.71.1: exit 0, 115 packages; its 521 real files: no difference; its DVB, PGS and VobSub pictures: identical; the three avc3 files, HLG by SEI, MPEG-2 and VP8 files read as expected.
  • FuzzReadMeta, FuzzInBandScan, FuzzCodecColour, 20 s each, exit 0, on 6b24995 (not run again on the two commits after it).

Cost: under the option, one more bounded read for an HEVC track declared bt2020-10, an MPEG-2 track with no profile, an avc3 track, and the first moof of a fragmented MP4.

Left as is: the strict walks of reindex and retime report the offset where the read breaks, not where the stray bytes start (fixing it would need a check that could refuse a valid file).

@gravity-zero
gravity-zero merged commit 46081e6 into master Nov 20, 2026
13 checks passed
@gravity-zero
gravity-zero deleted the fix/open-items-0.71.2 branch November 20, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant