mpegts: properly compute PTS of async KLV frames (#291) by aler9 · Pull Request #311 · bluenviron/mediacommon (original) (raw)

@aler9

@aler9 aler9 commented

Mar 1, 2026

Copy link Copy Markdown

Member

Store last valid PTS as soon as possible, by parsing PES headers in advance, then use this PTS as timestamp of KLV frames without PTS.

@aler9 aler9 mentioned this pull request

Mar 1, 2026

Bump go-astits and fix async KLV processing logic#291

Closed

@codecov

codecov Bot commented

Mar 1, 2026

edited

Loading

Copy link Copy Markdown

Codecov Report

❌ Patch coverage is 94.33962% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.11%. Comparing base (34f630d) to head (f2f2923).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/formats/mpegts/robust_demuxer.go 95.55% 1 Missing and 1 partial ⚠️
pkg/formats/mpegts/reader.go 50.00% 0 Missing and 1 partial ⚠️

Additional details and impacted files

@@ Coverage Diff @@ ## main #311 +/- ##

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:

@aler9

`[mpegts: properly compute PTS of async KLV frames (](/bluenviron/mediacommon/pull/311/commits/f2f29233ed6c002195add4cc7da0b0dbb1320b54 "mpegts: properly compute PTS of async KLV frames (#291)

Store last valid PTS as soon as possible, by parsing PES headers in advance, then use this PTS as timestamp of KLV frames without PTS.")#291[)](/bluenviron/mediacommon/pull/311/commits/f2f29233ed6c002195add4cc7da0b0dbb1320b54 "mpegts: properly compute PTS of async KLV frames (#291)

Store last valid PTS as soon as possible, by parsing PES headers in advance, then use this PTS as timestamp of KLV frames without PTS.") `

[f2f2923](/bluenviron/mediacommon/pull/311/commits/f2f29233ed6c002195add4cc7da0b0dbb1320b54)

Store last valid PTS as soon as possible, by parsing PES headers in advance, then use this PTS as timestamp of KLV frames without PTS.

@aler9 aler9 force-pushed the fix/lastpts branch from165ddbd tof2f2923 Compare

March 1, 2026 11:17

@aler9 aler9 merged commit 01c684e into main

Mar 1, 2026

7 checks passed

@aler9 aler9 deleted the fix/lastpts branch

March 1, 2026 11:19

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})