mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +00:00
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
This commit is contained in:
parent
820a445944
commit
f5a3a27726
1 changed files with 2 additions and 1 deletions
|
|
@ -303,7 +303,8 @@ import java.util.Arrays;
|
|||
|
||||
@Override
|
||||
public long readDiscontinuity() {
|
||||
if (notifyDiscontinuity) {
|
||||
if (notifyDiscontinuity
|
||||
&& (loadingFinished || getExtractedSamplesCount() > extractedSamplesCountAtStartOfLoad)) {
|
||||
notifyDiscontinuity = false;
|
||||
return lastSeekPositionUs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue