Commit 7267488
committed
RED5DEV-2156 playengine: clamp negative late-subscriber adjusted timestamps
When PlayEngine pushes a buffered keyframe (or any prelude event)
captured before the live anchor (videoBaseTs / audioBaseTs / publisher
timestamp offset), the rebase formula eventTime - baseTs + 2 produces
a negative result. The negative int writes to the wire as the equivalent
unsigned-32 value, which RTMP clients render as a far-future timestamp
(e.g. -97 ms -> 0xFFFFFF9F -> ~24.85 days when bit 31 is stripped, or
~49.7 days when read as full unsigned-32).
Clamp negative adjusted timestamps to 1 so buffered events precede the
first live frame at ts=2 without leaking into the unsigned-32 upper
half. Verified via ffplay end-to-end against an SRT/TS publisher: video
start went from 2147483.551s to 0.001s.1 parent 68acc70 commit 7267488
1 file changed
Lines changed: 10 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1202 | 1212 | | |
1203 | 1213 | | |
1204 | 1214 | | |
| |||
0 commit comments