Selaa lähdekoodia

android: disable HW accelerated decoding on Samsung

They just keep crashing.
master
Saúl Ibarra Corretgé 5 vuotta sitten
vanhempi
commit
38d1032fec

+ 12
- 7
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Näytä tiedosto

@@ -17,6 +17,8 @@
17 17
 package org.jitsi.meet.sdk;
18 18
 
19 19
 import android.app.Activity;
20
+import android.os.Build;
21
+
20 22
 import androidx.annotation.Nullable;
21 23
 
22 24
 import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
@@ -90,16 +92,19 @@ class ReactInstanceManagerHolder {
90 92
         options.setAudioDeviceModule(adm);
91 93
 
92 94
         VideoEncoderFactory videoEncoderFactory = new SoftwareVideoEncoderFactory();
93
-        VideoDecoderFactory videoDecoderFactory;
95
+        VideoDecoderFactory videoDecoderFactory = new SoftwareVideoDecoderFactory();
96
+
94 97
         // Initialize EGL context required for HW acceleration. We are only going to use it for
95 98
         // decoding.
96
-        EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
97
-        if (eglContext == null) {
98
-            // Fallback to the software decoder.
99
-            videoDecoderFactory = new SoftwareVideoDecoderFactory();
100
-        } else {
101
-            videoDecoderFactory = new DefaultVideoDecoderFactory(eglContext);
99
+        // NOTE: We are explicitly skipping Samsung devices because we have observed a high crash
100
+        // count on them.
101
+        if (!Build.MANUFACTURER.toLowerCase().contains("samsung")) {
102
+            EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
103
+            if (eglContext != null) {
104
+                videoDecoderFactory = new DefaultVideoDecoderFactory(eglContext);
105
+            }
102 106
         }
107
+
103 108
         options.setVideoDecoderFactory(videoDecoderFactory);
104 109
         options.setVideoEncoderFactory(videoEncoderFactory);
105 110
 

Loading…
Peruuta
Tallenna