Commit 7463011b by tonihei Committed by Ian Baker

Ignore format changes arriving after the media has been removed.

PiperOrigin-RevId: 426089165
parent 4ccd789f
...@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment