Don't check if next period is prepared when ignoring renderer media clock.

When the renderer media clock source read its stream to end but is not ready,
this means one of two things. Either the next period is not prepared yet and
we need to stop the renderers and buffer until it's prepared, or we are
waiting for another track in the current period with a uneven (longer)
duration.

The second case was already covered by this if condition and uses the standalone
clock instead to continue.

The first case now also uses the standalone clock, but it doesn't make a
difference, because both clocks are stopped and still synchronized.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175134975
This commit is contained in:
tonihei 2017-11-09 03:01:21 -08:00 committed by Oliver Woodman
parent 3171c86bdb
commit 6616e6c1a9

View file

@ -510,7 +510,7 @@ import java.io.IOException;
// durations. See: https://github.com/google/ExoPlayer/issues/1874.
if (rendererMediaClockSource == null || rendererMediaClockSource.isEnded()
|| (!rendererMediaClockSource.isReady()
&& rendererWaitingForNextStream(rendererMediaClockSource))) {
&& rendererMediaClockSource.hasReadStreamToEnd())) {
rendererPositionUs = standaloneMediaClock.getPositionUs();
} else {
rendererPositionUs = rendererMediaClock.getPositionUs();