Description
Issue description
ExoPlayer stop reproducing videos (fall into UNEXPECTED exception) when it tries to dynamically switch between surfaces and/or release/capture a new surface on Moto E (4) devices.
Most probably related to the issues: #3835, #4104, #3535.
I cloned the ExoPlayer locally (as per the README instructions) and tried to add the device to the workaround method "codecNeedsSetOutputSurfaceWorkaround()" as shown in the code bellow:
private static boolean codecNeedsSetOutputSurfaceWorkaround(String name) {
...
return ...
|| (("ALE-L21".equals(Util.MODEL) // Huawei P8 Lite
|| "CAM-L21".equals(Util.MODEL)) // Huawei Y6II
&& "OMX.k3.video.decoder.avc".equals(name))
|| ("woods_f".equals(Util.DEVICE)); // Moto E (4), XT1763 (Brazil)
}
And after testing in our dev environment it seems to have solved the problem, so I'm pretty sure it's related to the listed issues.
Reproduction steps
Try to switch between or release/capture surfaces on the specified device.
Also managed to reproduce in the demos by starting a video and backing to parent activity causing crash on surface release.
Link to test content
In this case it happened with any video streamed from links offered by the Vimeo API to our company's app.
Version of ExoPlayer being used
Tested on versions 2.6.x, 2.7.0 and 2.7.3.
Device(s) and version(s) of Android being used
Model: Moto E (4), Android 7.1.1, DEVICE/PRODUCT: "woods_f".
As of now no other device we tested or that has been using our app has encountered this problem.