[Android] Workaround for null MachineSpecs in getResampler()

Geoffrey Métais git at videolan.org
Mon Jun 6 16:47:49 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec  2 11:03:07 2015 +0100| [ae1a7f9a8530b30049621e81b727adb74aece6c7] | committer: Geoffrey Métais

Workaround for null MachineSpecs in getResampler()

(cherry picked from commit 848fad5b5082905dc946a5c558801a8cff828195)

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

 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 b7940bd..5ab60ee 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
@@ -152,7 +152,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