mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 03:25:03 +00:00
Use current time as initial timestamp on error
If the initial timestamp could not be retrieved, use the current time as returned by System.nanoTime(). In practice, it is the same time base as AudioRecord timestamps. Fixes #4536 <https://github.com/Genymobile/scrcpy/issues/4536>
This commit is contained in:
parent
ec41896c85
commit
6a58891e13
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,8 @@ public final class AudioCapture {
|
|||
previousRecorderTimestamp = timestamp.nanoTime;
|
||||
} else {
|
||||
if (nextPts == 0) {
|
||||
Ln.w("Could not get any audio timestamp");
|
||||
Ln.w("Could not get initial audio timestamp");
|
||||
nextPts = System.nanoTime() / 1000;
|
||||
}
|
||||
// compute from previous timestamp and packet size
|
||||
pts = nextPts;
|
||||
|
|
Loading…
Add table
Reference in a new issue