Ignore format changes arriving after the media has been removed.
PiperOrigin-RevId: 426089165
This commit is contained in:
parent
7e873b5121
commit
530c868c17
@ -239,6 +239,11 @@ public final class MediaMetricsListener
|
||||
|
||||
@Override
|
||||
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 =
|
||||
new PendingFormatUpdate(
|
||||
checkNotNull(mediaLoadData.trackFormat),
|
||||
|
Loading…
x
Reference in New Issue
Block a user