mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
ExtractorMediaPeriod: Use URI sha1 hash as the DataSpec key.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130422264
This commit is contained in:
parent
7bed85950e
commit
671a15badf
1 changed files with 3 additions and 1 deletions
|
|
@ -38,6 +38,7 @@ import com.google.android.exoplayer2.upstream.Loader;
|
|||
import com.google.android.exoplayer2.upstream.Loader.Loadable;
|
||||
import com.google.android.exoplayer2.util.Assertions;
|
||||
import com.google.android.exoplayer2.util.ConditionVariable;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -558,7 +559,8 @@ import java.util.Arrays;
|
|||
ExtractorInput input = null;
|
||||
try {
|
||||
long position = positionHolder.position;
|
||||
length = dataSource.open(new DataSpec(uri, position, C.LENGTH_UNBOUNDED, null));
|
||||
length = dataSource.open(
|
||||
new DataSpec(uri, position, C.LENGTH_UNBOUNDED, Util.sha1(uri.toString())));
|
||||
if (length != C.LENGTH_UNBOUNDED) {
|
||||
length += position;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue