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
4112a99f
authored
Feb 03, 2022
by
tonihei
Committed by
Ian Baker
Feb 21, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Ignore format changes arriving after the media has been removed.
PiperOrigin-RevId: 426089165
parent
9e3eb6c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java
library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java
View file @
4112a99f
...
@@ -237,6 +237,11 @@ public final class MediaMetricsListener
...
@@ -237,6 +237,11 @@ public final class MediaMetricsListener
@Override
@Override
public
void
onDownstreamFormatChanged
(
EventTime
eventTime
,
MediaLoadData
mediaLoadData
)
{
public
void
onDownstreamFormatChanged
(
EventTime
eventTime
,
MediaLoadData
mediaLoadData
)
{
if
(
eventTime
.
mediaPeriodId
==
null
)
{
// This event arrived after the media has been removed from the playlist or a custom
// MediaSource forgot to set the right id. Ignore the track change in these cases.
return
;
}
PendingFormatUpdate
update
=
PendingFormatUpdate
update
=
new
PendingFormatUpdate
(
new
PendingFormatUpdate
(
checkNotNull
(
mediaLoadData
.
trackFormat
),
checkNotNull
(
mediaLoadData
.
trackFormat
),
...
...
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