[Android] LibVLC: Media: enable dvdnav for .iso on network shares

Thomas Guillem git at videolan.org
Wed Feb 21 16:25:32 CET 2018


vlc-android | branch: 3.0.x | Thomas Guillem <thomas at gllm.fr> | Wed Feb 21 12:01:34 2018 +0100| [78b21d5bbbfcdccdc472bf1f667ff8e0a2fd756f] | committer: Geoffrey Métais

LibVLC: Media: enable dvdnav for .iso on network shares

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/78b21d5bbbfcdccdc472bf1f667ff8e0a2fd756f
---

 libvlc/src/org/videolan/libvlc/Media.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index f3a91e8d7..152a3d81e 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -781,6 +781,11 @@ public class Media extends VLCObject<Media.Event> {
         }
         if (!codecOptionSet)
             setHWDecoderEnabled(true, false);
+
+        /* dvdnav need to be explicitly forced for network playbacks */
+        if (mUri != null && mUri.getScheme() != null && !mUri.getScheme().equalsIgnoreCase("file") &&
+                mUri.getLastPathSegment() != null && mUri.getLastPathSegment().toLowerCase().endsWith(".iso"))
+            addOption(":demux=dvdnav,any");
     }
 
     /**



More information about the Android mailing list