Fix seeking before a source is set.

Before this change, calling seekTo then setPlayWhenReady would cause the player
throw an error, due to using the sample source provider before it's set.

Transition to the buffering state in seekToInternal only if we have a sample
source provider.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126804528
This commit is contained in:
andrewlewis 2016-07-07 07:42:57 -07:00 committed by Oliver Woodman
parent e02ca775f3
commit 42d78b3559

View file

@ -468,7 +468,6 @@ import java.util.ArrayList;
return;
}
setState(ExoPlayer.STATE_BUFFERING);
stopRenderers();
rebuffering = false;
@ -483,6 +482,7 @@ import java.util.ArrayList;
updatePlaybackPositions();
if (sampleSourceProvider != null) {
setState(ExoPlayer.STATE_BUFFERING);
handler.sendEmptyMessage(MSG_DO_SOME_WORK);
}
} finally {