mirror of
https://github.com/samsonjs/media.git
synced 2026-04-07 11:35:46 +00:00
Add an additional sanity check to FakeExtractorOutput
PiperOrigin-RevId: 285422885
This commit is contained in:
parent
b7b3a15855
commit
b3f485d7d9
1 changed files with 4 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertWithMessage;
|
|||
|
||||
import android.content.Context;
|
||||
import android.util.SparseArray;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.extractor.ExtractorOutput;
|
||||
import com.google.android.exoplayer2.extractor.SeekMap;
|
||||
import java.io.File;
|
||||
|
|
@ -69,6 +70,9 @@ public final class FakeExtractorOutput implements ExtractorOutput, Dumper.Dumpab
|
|||
|
||||
@Override
|
||||
public void seekMap(SeekMap seekMap) {
|
||||
if (seekMap.isSeekable() && seekMap.getDurationUs() == C.TIME_UNSET) {
|
||||
throw new IllegalStateException("SeekMap cannot be seekable and have an unknown duration");
|
||||
}
|
||||
this.seekMap = seekMap;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue