question: long ptsToTimeUs ( long pts ) { if ( lastPts != Long . MIN_VALUE ) { long closestWrapCount = ( lastPts + ( MAX_PTS / 2 ) ) / MAX_PTS ; long ptsWrapBelow = pts + ( MAX_PTS * ( closestWrapCount - 1 ) ) ; long ptsWrapAbove = pts + ( MAX_PTS * closestWrapCount ) ; pts = Math . abs ( ptsWrapBelow - lastPts ) < Math . abs ( ptsWrapAbove - lastPts ) ? ptsWrapBelow : ptsWrapAbove ; } long timeUs = ( pts * C . MICROS_PER_SECOND ) / 90000 ; if ( lastPts == Long . MIN_VALUE ) { timestampOffsetUs = firstSampleTimestamp - timeUs ; } lastPts = pts ; return timeUs + timestampOffsetUs ; }
target:  Adjusts a PTS value to the corresponding time in microseconds, accounting for PTS wraparound.