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

Thomas Guillem git at videolan.org
Wed Feb 21 12:02:14 CET 2018


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb 21 12:01:34 2018 +0100| [dc3494c1df5797984ff0b822ff76b6e06b5bba02] | committer: Thomas Guillem

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

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

 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