[Android] Disable subs for TS from any source

Geoffrey Métais git at videolan.org
Mon Nov 13 15:04:07 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Nov 13 14:07:56 2017 +0100| [6167f4f353db07e43bdedccde16eba9ea37f3c27] | committer: Geoffrey Métais

Disable subs for TS from any source

(cherry picked from commit 0502fcfdc7aa4def2a956c1f52e4be48fee1631d)

> https://code.videolan.org/videolan/vlc-android/commit/6167f4f353db07e43bdedccde16eba9ea37f3c27
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 41bb9d49e..6dfcdacf6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -3313,10 +3313,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
 
     private boolean enableSubs = true;
     private void enableSubs() {
-        if (mUri == null) return;
-        if (mUri.getScheme() == null || !mUri.getScheme().startsWith("http")) {
-            enableSubs = true;
-        } else {
+        if (mUri != null) {
             final String lastPath = mUri.getLastPathSegment();
             enableSubs = !TextUtils.isEmpty(lastPath) && !lastPath.endsWith(".ts") && !lastPath.endsWith(".m2ts")
                     && !lastPath.endsWith(".TS") && !lastPath.endsWith(".M2TS");



More information about the Android mailing list