From 9175ee2c6cba871205bb332890fc03cfb4439abc Mon Sep 17 00:00:00 2001 From: Johan Lindquist Date: Fri, 1 Sep 2017 09:17:44 -0400 Subject: [PATCH] #3230: SmoothStreaming URLs that uses parenthesis '(...)' as part of the URL causes server side errors --- .../exoplayer2/source/smoothstreaming/SsMediaSource.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java index 885d5bd2273..00b0f68b65f 100644 --- a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java +++ b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java @@ -192,9 +192,7 @@ private SsMediaSource(SsManifest manifest, Uri manifestUri, AdaptiveMediaSourceEventListener eventListener) { Assertions.checkState(manifest == null || !manifest.isLive); this.manifest = manifest; - this.manifestUri = manifestUri == null ? null - : Util.toLowerInvariant(manifestUri.getLastPathSegment()).equals("manifest") ? manifestUri - : Uri.withAppendedPath(manifestUri, "Manifest"); + this.manifestUri = manifestUri == null ? null : lastPathSegment.contains("manifest") && lastPathSegment.contains("(") && lastPathSegment.contains(")")) ? manifestUri : lastPathSegment.equals("manifest") ? manifestUri : Uri.withAppendedPath(manifestUri, "Manifest"); this.manifestDataSourceFactory = manifestDataSourceFactory; this.manifestParser = manifestParser; this.chunkSourceFactory = chunkSourceFactory;