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
7760eca2
authored
Jul 16, 2019
by
olly
Committed by
Oliver Woodman
Jul 18, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Deep compare formats in SampleMetadataQueue instead of shallow compare
PiperOrigin-RevId: 258285645
parent
2b5c42e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/SampleMetadataQueue.java
library/core/src/main/java/com/google/android/exoplayer2/source/SampleMetadataQueue.java
View file @
7760eca2
...
...
@@ -227,7 +227,7 @@ import com.google.android.exoplayer2.util.Util;
return
SampleQueue
.
PEEK_RESULT_NOTHING
;
}
int
relativeReadIndex
=
getRelativeIndex
(
readPosition
);
if
(
formats
[
relativeReadIndex
]
!=
downstreamFormat
)
{
if
(
formats
[
relativeReadIndex
]
.
equals
(
downstreamFormat
)
)
{
return
SampleQueue
.
PEEK_RESULT_FORMAT
;
}
else
{
return
(
flags
[
relativeReadIndex
]
&
C
.
BUFFER_FLAG_ENCRYPTED
)
!=
0
...
...
@@ -275,7 +275,7 @@ import com.google.android.exoplayer2.util.Util;
buffer
.
setFlags
(
C
.
BUFFER_FLAG_END_OF_STREAM
);
return
C
.
RESULT_BUFFER_READ
;
}
else
if
(
upstreamFormat
!=
null
&&
(
formatRequired
||
upstreamFormat
!=
downstreamFormat
))
{
&&
(
formatRequired
||
!
upstreamFormat
.
equals
(
downstreamFormat
)
))
{
formatHolder
.
format
=
upstreamFormat
;
return
C
.
RESULT_FORMAT_READ
;
}
else
{
...
...
@@ -284,7 +284,7 @@ import com.google.android.exoplayer2.util.Util;
}
int
relativeReadIndex
=
getRelativeIndex
(
readPosition
);
if
(
formatRequired
||
formats
[
relativeReadIndex
]
!=
downstreamFormat
)
{
if
(
formatRequired
||
!
formats
[
relativeReadIndex
].
equals
(
downstreamFormat
)
)
{
formatHolder
.
format
=
formats
[
relativeReadIndex
];
return
C
.
RESULT_FORMAT_READ
;
}
...
...
@@ -422,7 +422,6 @@ import com.google.android.exoplayer2.util.Util;
}
upstreamFormatRequired
=
false
;
if
(
Util
.
areEqual
(
format
,
upstreamFormat
))
{
// Suppress changes between equal formats so we can use referential equality in readData.
return
false
;
}
else
{
upstreamFormat
=
format
;
...
...
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