Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
720f0012
authored
Jun 02, 2020
by
olly
Committed by
Oliver Woodman
Jun 02, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
AudioTrackPositionTracker: Prevent negative timestamps
Issue: #7456 PiperOrigin-RevId: 314408767
parent
5b06d894
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java
RELEASENOTES.md
View file @
720f0012
...
...
@@ -195,8 +195,9 @@
*
Fix "Not allowed to start service"
`IllegalStateException`
in
`DownloadService`
(
[
#7306
](
https://github.com/google/ExoPlayer/issues/7306
)
).
*
Ads:
*
Fix
`AdsMediaSource`
child
`MediaSource`
s not being released.
*
Fix issue in
`AudioTrackPositionTracker`
that could cause negative positions
to be reported at the start of playback and immediately after seeking
(
[
#7456
](
https://github.com/google/ExoPlayer/issues/7456
)
.
*
DASH:
*
Merge trick play adaptation sets (i.e., adaptation sets marked with
`http://dashif.org/guidelines/trickmode`
) into the same
`TrackGroup`
as
...
...
@@ -242,6 +243,7 @@
(
[
#5444
](
https://github.com/google/ExoPlayer/issues/5444
)
,
[
#5966
](
https://github.com/google/ExoPlayer/issues/5966
)
,
[
#7002
](
https://github.com/google/ExoPlayer/issues/7002
)
).
*
Fix
`AdsMediaSource`
child
`MediaSource`
s not being released.
*
Cronet extension: Default to using the Cronet implementation in Google Play
Services rather than Cronet Embedded. This allows Cronet to be used with a
negligible increase in application size, compared to approximately 8MB when
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java
View file @
720f0012
...
...
@@ -206,6 +206,7 @@ import java.lang.reflect.Method;
hasData
=
false
;
stopTimestampUs
=
C
.
TIME_UNSET
;
forceResetWorkaroundTimeMs
=
C
.
TIME_UNSET
;
lastLatencySampleTimeUs
=
0
;
latencyUs
=
0
;
}
...
...
@@ -239,7 +240,7 @@ import java.lang.reflect.Method;
positionUs
=
systemTimeUs
+
smoothedPlayheadOffsetUs
;
}
if
(!
sourceEnded
)
{
positionUs
-=
latencyUs
;
positionUs
=
Math
.
max
(
0
,
positionUs
-
latencyUs
)
;
}
return
positionUs
;
}
...
...
@@ -353,7 +354,7 @@ import java.lang.reflect.Method;
}
/**
* Resets the position tracker. Should be called when the audio track previous passed to {@link
* Resets the position tracker. Should be called when the audio track previous
ly
passed to {@link
* #setAudioTrack(AudioTrack, int, int, int)} is no longer in use.
*/
public
void
reset
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment