• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Eyevinn / mp4ff / 40086837776
83%
master: 85%

Build:
Build:
LAST BUILD BRANCH: fix/crop-tables
DEFAULT BRANCH: master
Ran 24 Oct 2026 10:40AM UTC
Jobs 1
Files 221
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2026 10:38AM UTC coverage: 82.986% (+0.04%) from 82.951%
40086837776

Pull #668

github

tobbee
fix(mp4): stop panics in segment and fragment methods on missing boxes

File.UpdateSidx dereferenced the tkhd and mdhd of the reference track and
the tfdt of the first traf of each segment. It now returns an error for a
reference track without tkhd or mdhd. A traf need not have a tfdt (ISO/IEC
14496-12 clause 8.8.12), so one without it is taken to start at decode time
0, as Fragment.GetFullSamples and the stream decoder already do.

Fragment.GetSampleNrFromTime and Fragment.GetSampleInterval read the tfdt
without a check, and also take a traf without it to start at decode time 0.

A moof without traf is allowed, but MoofBox.Encode and EncodeSW read the
truns of the first traf to check their data offsets, so decoding such a
file and encoding it again panicked. Fragment.Encode and EncodeSW with
OptimizeTrun called OptimizeTfhdTrun on the missing traf. Both steps are
skipped when there is no traf.

MediaSegment.Fragmentify read the tfhd of the first traf and the mfhd of
each moof. It skips a fragment without traf, which has no samples, and
returns an error for a moof without mfhd.

Fragment.AddSampleInterval read the first traf before checking that there
is one, and the tfdt and mdat without checks. It checks the traf and trun
counts first, and returns an error before changing anything when the tfdt
or the mdat is missing.

InitSegment.GetMediaType returns "unknown" when the init segment has no
track, or the first track has no mdia or hdlr.

The cases were found by renaming one box type to free in testdata files
and calling the methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01At28EcpTrbTU5CXRWWUhM1
Pull Request #668: fix(mp4): stop panics in segment and fragment methods on missing boxes

42 of 46 new or added lines in 5 files covered. (91.3%)

2 existing lines in 1 file now uncovered.

24183 of 29141 relevant lines covered (82.99%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
64.71
0.1% mp4/moof.go

Coverage Regressions

Lines Coverage ∆ File
2
64.71
0.1% mp4/moof.go
Jobs
ID Job ID Ran Files Coverage
1 40086837776.1 24 Oct 2026 10:40AM UTC 221
82.99
GitHub Action Run
Source Files on build 40086837776
  • Tree
  • List 221
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #668
  • PR Base - master (#40086234698)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc