Fix meizu 16th NPE

Fill AppInfo to avoid NullPointerException on some devices.

Fixes <https://github.com/Genymobile/scrcpy/issues/365>

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
act262
2019-10-28 11:18:53 +08:00
committed by Romain Vimont
parent 213c468c20
commit 90293240cc
2 changed files with 44 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ public class ScreenEncoder implements Device.RotationListener {
public void streamScreen(Device device, FileDescriptor fd) throws IOException {
Workarounds.prepareMainLooper();
Workarounds.fillAppInfo();
MediaFormat format = createFormat(bitRate, maxFps, iFrameInterval);
device.setRotationListener(this);