Commit 671a15ba by eguven Committed by Oliver Woodman

ExtractorMediaPeriod: Use URI sha1 hash as the DataSpec key.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130422264
parent 7bed8595
...@@ -38,6 +38,7 @@ import com.google.android.exoplayer2.upstream.Loader; ...@@ -38,6 +38,7 @@ import com.google.android.exoplayer2.upstream.Loader;
import com.google.android.exoplayer2.upstream.Loader.Loadable; import com.google.android.exoplayer2.upstream.Loader.Loadable;
import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.ConditionVariable; import com.google.android.exoplayer2.util.ConditionVariable;
import com.google.android.exoplayer2.util.Util;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
...@@ -558,7 +559,8 @@ import java.util.Arrays; ...@@ -558,7 +559,8 @@ import java.util.Arrays;
ExtractorInput input = null; ExtractorInput input = null;
try { try {
long position = positionHolder.position; 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) { if (length != C.LENGTH_UNBOUNDED) {
length += position; length += position;
} }
......
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