Fix DASH period index calculation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130612920
This commit is contained in:
andrewlewis 2016-08-18 01:49:09 -07:00 committed by Oliver Woodman
parent b2a28a140c
commit 1695e2ac48

View File

@ -348,7 +348,7 @@ public final class DashMediaSource implements MediaSource {
private void processManifest() {
// Update any periods.
for (int i = 0; i < periodsById.size(); i++) {
periodsById.valueAt(i).updateManifest(manifest, firstPeriodId + periodsById.keyAt(i));
periodsById.valueAt(i).updateManifest(manifest, periodsById.keyAt(i) - firstPeriodId);
}
// Remove any pending simulated updates.
handler.removeCallbacks(simulateManifestRefreshRunnable);