[Android] Workaround for null MachineSpecs in getResampler()

Geoffrey Métais git at videolan.org
Wed Dec 2 11:04:02 CET 2015


vlc-ports/android | branch: 1.7.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec  2 11:03:07 2015 +0100| [848fad5b5082905dc946a5c558801a8cff828195] | committer: Geoffrey Métais

Workaround for null MachineSpecs in getResampler()

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=848fad5b5082905dc946a5c558801a8cff828195
---

 vlc-android/src/org/videolan/vlc/util/VLCOptions.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
index f7bda39..7208279 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
@@ -140,7 +140,7 @@ public class VLCOptions {
 
     private static String getResampler() {
         final VLCUtil.MachineSpecs m = VLCUtil.getMachineSpecs();
-        return m.processors > 2 ? "soxr" : "ugly";
+        return (m == null || m.processors > 2) ? "soxr" : "ugly";
     }
 
     public static void setMediaOptions(Media media, Context context, int flags) {



More information about the Android mailing list