Do not add 1µS to the PTS in corner cases

The PTS must be monotonically increasing, but not strictly.
This commit is contained in:
Romain Vimont
2023-06-02 21:38:30 +02:00
parent 2aec7b4c9d
commit 0f28d39127

View File

@@ -163,7 +163,7 @@ public final class AudioCapture {
// - an estimation from the previous PTS and the packet size as a fallback.
//
// Therefore, the property that PTS are monotonically increasing is no guaranteed in corner cases, so enforce it.
pts = previousPts + 1;
pts = previousPts;
}
previousPts = pts;