Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stick to new dash manifest uri after http 302 redirection #7064

Merged
merged 3 commits into from
Mar 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -791,14 +791,21 @@ protected void releaseSourceInternal() {
manifestLoadPending &= manifest.dynamic;
manifestLoadStartTimestampMs = elapsedRealtimeMs - loadDurationMs;
manifestLoadEndTimestampMs = elapsedRealtimeMs;
if (manifest.location != null) {
boolean isRedirect = !loadable.getUri().equals(this.manifestUri);
boolean hasLocation = manifest.location != null;

if (isRedirect || hasLocation) {
synchronized (manifestUriLock) {
// This condition checks that replaceManifestUri wasn't called between the start and end of
// this load. If it was, we ignore the manifest location and prefer the manual replacement.
@SuppressWarnings("ReferenceEquality")
boolean isSameUriInstance = loadable.dataSpec.uri == manifestUri;
if (isSameUriInstance) {
manifestUri = manifest.location;
if (hasLocation) {
manifestUri = manifest.location;
} else {
manifestUri = loadable.getUri();
}
}
}
}
Expand Down