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

Eyevinn / mp4ff / 37910022516
83%
master: 83%

Build:
Build:
LAST BUILD BRANCH: fix/segmenter-last-sample
DEFAULT BRANCH: master
Ran 09 Oct 2026 09:15AM 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

09 Oct 2026 09:14AM UTC coverage: 82.81% (+0.05%) from 82.76%
37910022516

Pull #640

github

tobbee
feat(mp4): read sample data from the files that a track's dref names

A track's dref box can place its sample data in other files, as Unified Streaming dref MP4s and MP4Box -dref files do. Since #618, mp4ff reports such tracks with CheckDataIsSelfContained, but cannot read them.

File.ReadSampleData reads the samples of an interval of a progressive track. For each chunk it looks up the sample description (by chunk, which needs the stsc fix before this commit), then the data entry, and reads the chunk from the mdat box or, for an external entry, through a DataResolver. Adjacent chunks in the same data are read with one call, which matters for resolvers that fetch over a network. Each read grows the result by at most 16 MiB, so sample sizes that the data does not back cannot make it allocate much more than it reads.

LocalFileResolver resolves url entries with a relative location to files below a directory and keeps them open until Close. It rejects URLs with a scheme or host, absolute paths, and paths leading outside the directory.

CheckDataIsSelfContained now shares the lookup from sample description to data entry with ReadSampleData.

The segmenter example reads samples with ReadSampleData and resolves other files relative to its input, except in the single-track lazy mode, which copies from the input file.

Validated on Unified Streaming's sample-content: every sample of the 4 tracks of logo_5s_dref.mp4 and the 11 tracks of remix08_dref.mp4 matches the sample at the same offset in the source files. The segmenter's output for logo_5s_dref.mp4 decodes without errors in ffmpeg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #640: feat(mp4): read sample data from the files that a track's dref names

173 of 200 new or added lines in 6 files covered. (86.5%)

2 existing lines in 1 file now uncovered.

24000 of 28982 relevant lines covered (82.81%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
80.91
mp4/sampledata.go
4
88.07
-1.5% mp4/trak.go
2
81.25
4.52% examples/segmenter/segmenter.go

Coverage Regressions

Lines Coverage ∆ File
2
83.54
0.43% examples/segmenter/main.go
Jobs
ID Job ID Ran Files Coverage
1 37910022516.1 09 Oct 2026 09:15AM UTC 221
82.81
GitHub Action Run
Source Files on build 37910022516
  • Tree
  • List 221
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #640
  • PR Base - master (#37909981006)
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