Commit 8f691a0
fix: ensure strictly monotonic PTS within SPS/PPS/IDR triplets
SPS, PPS and IDR NAL units in a single GetStream() call all share the
same imp_ts (taken from the last pack in the group). In IMPDeviceSource
this caused all three to compute the same delta_us and therefore receive
identical fPresentationTime values, producing duplicate RTP timestamps
that mpv reports as 'Invalid video timestamp: X -> X'.
Change the backward-jitter clamp from strict less-than to less-than-or-
equal and advance delta_us by 12 µs (one 90 kHz tick) per repeated
timestamp. This gives each NAL in the triplet a unique, still strictly
monotonic PTS without altering the perceived frame rate or reanchoring
the wall-clock base.
Also remove the temporary per-frame GetStream debug logging added during
root-cause investigation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 92eee4a commit 8f691a0
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
0 commit comments