
newPlayingPeriodHolder could be set then updated if seeking to a repeated period that was loaded more than once. This led to MediaPeriodHolders leaking. Only set newPlayingPeriodHolder once so that any later holders with the same period identifier get released. Also add a regression test. FakeMediaSource checks that all created MediaPeriods were released when it is released. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172591937