Skip to content

Display and control your Android device

Remove MediaCodec error suggestion fix

Romain Vimont0ec64baad437
diff --git a/server/src/main/java/com/genymobile/scrcpy/Server.java b/server/src/main/java/com/genymobile/scrcpy/Server.java
index 21e3fd92..9d7a62e3 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Server.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Server.java
@@ -1,7 +1,6 @@
package com.genymobile.scrcpy;
import android.graphics.Rect;
-import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.os.BatteryManager;
import android.os.Build;
@@ -267,16 +266,6 @@ public final class Server {
}
private static void suggestFix(Throwable e) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
- if (e instanceof MediaCodec.CodecException) {
- MediaCodec.CodecException mce = (MediaCodec.CodecException) e;
- if (mce.getErrorCode() == 0xfffffc0e) {
- Ln.e("The hardware encoder is not able to encode at the given definition.");
- Ln.e("Try with a lower definition:");
- Ln.e(" scrcpy -m 1024");
- }
- }
- }
if (e instanceof InvalidDisplayIdException) {
InvalidDisplayIdException idie = (InvalidDisplayIdException) e;
int[] displayIds = idie.getAvailableDisplayIds();