Commit f581acbf by tonihei Committed by Oliver Woodman

Allow reusing SingleSampleMediaSource.

GitHub:#3498

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183391117
parent de8d402a
......@@ -158,8 +158,6 @@ public final class SingleSampleMediaSource implements MediaSource {
private final boolean treatLoadErrorsAsEndOfStream;
private final Timeline timeline;
private boolean isPrepared;
/**
* @param uri The {@link Uri} of the media stream.
* @param dataSourceFactory The factory from which the {@link DataSource} to read the media will
......@@ -253,8 +251,6 @@ public final class SingleSampleMediaSource implements MediaSource {
@Override
public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) {
Assertions.checkState(!isPrepared, MEDIA_SOURCE_REUSED_ERROR_MESSAGE);
isPrepared = true;
listener.onSourceInfoRefreshed(this, 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