Commit 63ab601d by andrewlewis Committed by Oliver Woodman

Use consistent identifiers for extractor periods.

Also, fix clearing the timeline for source info changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130292700
parent 80227840
......@@ -821,6 +821,8 @@ import java.io.IOException;
// Release all loaded periods and seek to the new playing period index.
releasePeriodsFrom(playingPeriod);
playingPeriod = null;
readingPeriod = null;
loadingPeriod = null;
MediaSource.Position defaultStartPosition =
mediaSource.getDefaultStartPosition(newPlayingPeriodIndex);
......@@ -851,6 +853,8 @@ import java.io.IOException;
index = playingPeriod.index;
releasePeriodsFrom(playingPeriod);
playingPeriod = null;
readingPeriod = null;
loadingPeriod = null;
seekToPeriodPosition(index, 0);
return;
}
......
......@@ -135,7 +135,7 @@ public final class ExtractorMediaSource implements MediaSource, MediaSource.List
@Override
public void prepareSource(MediaSource.Listener listener) {
sourceListener = listener;
timeline = new SinglePeriodTimeline(this, C.UNSET_TIME_US, false);
timeline = new SinglePeriodTimeline(0, C.UNSET_TIME_US, false);
listener.onSourceInfoRefreshed(timeline, null);
}
......
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