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
c7a1151c
authored
Aug 07, 2020
by
christosts
Committed by
kim-vde
Aug 07, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use MimeType.allSamplesAreSyncSamples in ClippingMediaPeriod
PiperOrigin-RevId: 325409392
parent
6a54ddd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaPeriod.java
library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaPeriod.java
View file @
c7a1151c
...
@@ -258,13 +258,13 @@ public final class ClippingMediaPeriod implements MediaPeriod, MediaPeriod.Callb
...
@@ -258,13 +258,13 @@ public final class ClippingMediaPeriod implements MediaPeriod, MediaPeriod.Callb
// negative timestamp, its offset timestamp can jump backwards compared to the last timestamp
// negative timestamp, its offset timestamp can jump backwards compared to the last timestamp
// read in the previous period. Renderer implementations may not allow this, so we signal a
// read in the previous period. Renderer implementations may not allow this, so we signal a
// discontinuity which resets the renderers before they read the clipping sample stream.
// discontinuity which resets the renderers before they read the clipping sample stream.
// However, for
audio-only track selections we assume to have random access seek behaviour and
// However, for
tracks where all samples are sync samples, we assume they have random access
// do not need an initial discontinuity to reset the renderer.
//
seek behaviour and
do not need an initial discontinuity to reset the renderer.
if
(
startUs
!=
0
)
{
if
(
startUs
!=
0
)
{
for
(
TrackSelection
trackSelection
:
selections
)
{
for
(
TrackSelection
trackSelection
:
selections
)
{
if
(
trackSelection
!=
null
)
{
if
(
trackSelection
!=
null
)
{
Format
selectedFormat
=
trackSelection
.
getSelectedFormat
();
Format
selectedFormat
=
trackSelection
.
getSelectedFormat
();
if
(!
MimeTypes
.
isAudio
(
selectedFormat
.
sampleMimeType
))
{
if
(!
MimeTypes
.
allSamplesAreSyncSamples
(
selectedFormat
.
sampleMimeType
))
{
return
true
;
return
true
;
}
}
}
}
...
...
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