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
0dfc1d3b
authored
May 19, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Don't sample the timestamp/latency for AC-3 passthrough playback.
parent
9f53ea81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
View file @
0dfc1d3b
...
...
@@ -574,6 +574,7 @@ public final class AudioTrack {
submittedBytes
=
0
;
temporaryBufferSize
=
0
;
startMediaTimeUs
=
START_NOT_SET
;
latencyUs
=
0
;
resetSyncParams
();
int
playState
=
audioTrack
.
getPlayState
();
if
(
playState
==
android
.
media
.
AudioTrack
.
PLAYSTATE_PLAYING
)
{
...
...
@@ -647,9 +648,10 @@ public final class AudioTrack {
}
}
if
(
systemClockUs
-
lastTimestampSampleTimeUs
>=
MIN_TIMESTAMP_SAMPLE_INTERVAL_US
)
{
// Don't use AudioTrack.getTimestamp() on AC-3 tracks, as it gives an incorrect timestamp.
audioTimestampSet
=
!
isAc3
&&
audioTrackUtil
.
updateTimestamp
();
// Don't sample the timestamp and latency if this is an AC-3 passthrough AudioTrack, as the
// returned values cause audio/video synchronization to be incorrect.
if
(!
isAc3
&&
systemClockUs
-
lastTimestampSampleTimeUs
>=
MIN_TIMESTAMP_SAMPLE_INTERVAL_US
)
{
audioTimestampSet
=
audioTrackUtil
.
updateTimestamp
();
if
(
audioTimestampSet
)
{
// Perform sanity checks on the timestamp.
long
audioTimestampUs
=
audioTrackUtil
.
getTimestampNanoTime
()
/
1000
;
...
...
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