[Android] VLCUtil: fix thumbnails for dvd
Thomas Guillem
git at videolan.org
Wed Sep 9 15:19:19 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 9 15:10:00 2015 +0200| [08649634dd2c6ff9640cb6b20c5bbb47120f37dd] | committer: Thomas Guillem
VLCUtil: fix thumbnails for dvd
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=08649634dd2c6ff9640cb6b20c5bbb47120f37dd
---
libvlc/src/org/videolan/libvlc/util/VLCUtil.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libvlc/src/org/videolan/libvlc/util/VLCUtil.java b/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
index 25d8e9b..bb3b911 100644
--- a/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
+++ b/libvlc/src/org/videolan/libvlc/util/VLCUtil.java
@@ -39,7 +39,6 @@ import android.util.Log;
import org.videolan.libvlc.LibVLC;
import org.videolan.libvlc.Media;
-import org.videolan.libvlc.util.AndroidUtil;
public class VLCUtil {
public final static String TAG = "VLC/LibVLC/Util";
@@ -519,6 +518,9 @@ public class VLCUtil {
* @return a bytearray with the RGBA thumbnail data inside.
*/
public static byte[] getThumbnail(LibVLC libVLC, Uri uri, int i_width, int i_height) {
+ /* dvd thumbnails can work only with dvdsimple demux */
+ if (uri.getLastPathSegment().endsWith(".iso"))
+ uri = Uri.parse("dvdsimple://" + uri.getEncodedPath());
final Media media = new Media(libVLC, uri);
byte[] bytes = getThumbnail(media, i_width, i_height);
media.release();
More information about the Android
mailing list