[Android] LibVLC: fix crash when getMachineSpecs() return null
Thomas Guillem
git at videolan.org
Thu Oct 23 10:21:05 CEST 2014
vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Wed Oct 22 15:52:39 2014 +0200| [36d2510c1214eb132c4748c5d18b881ce748f216] | committer: Thomas Guillem
LibVLC: fix crash when getMachineSpecs() return null
It can happen with libvlcjni.so library is not found.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=36d2510c1214eb132c4748c5d18b881ce748f216
---
vlc-android/src/org/videolan/libvlc/LibVLC.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index 23bd241..8d5ad0e 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -409,6 +409,8 @@ public class LibVLC {
* Skip non-key (3) for all devices that don't meet anything above
*/
LibVlcUtil.MachineSpecs m = LibVlcUtil.getMachineSpecs();
+ if (m == null)
+ return ret;
if( (m.hasArmV6 && !(m.hasArmV7)) || m.hasMips )
ret = 4;
else if(m.frequency >= 1200 && m.processors > 2)
More information about the Android
mailing list