Commit f5a3a277 by olly Committed by Oliver Woodman

Deduplicate ExtractorMediaPeriod discontinuity reporting

This change makes sure progress is being made before reporting
a discontinuity. Else in cases like having no network and
playing a live stream, we allow the discontinuity to be read
each time an internal retry occurs, meaning it gets read
repeatedly. This does no harm, but is noisy and unnecessary.

We should also not allow skipping whilst there is a pending
reset or discontinuity notification, just like we don't allow
reads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175953064
parent 820a4459
......@@ -303,7 +303,8 @@ import java.util.Arrays;
@Override
public long readDiscontinuity() {
if (notifyDiscontinuity) {
if (notifyDiscontinuity
&& (loadingFinished || getExtractedSamplesCount() > extractedSamplesCountAtStartOfLoad)) {
notifyDiscontinuity = false;
return lastSeekPositionUs;
}
......
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