Commit 7d489a88 by ojw28 Committed by GitHub

Merge pull request #4441 from murdly/dev-v2

opt out of using DummySurface on specific Fire TV device
parents 4f57c465 99d3e8f1
......@@ -825,10 +825,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
private boolean shouldUseDummySurface(MediaCodecInfo codecInfo) {
return Util.SDK_INT >= 23
&& !tunneling
&& !codecNeedsDummySurfaceWorkaround(codecInfo.name)
&& !codecNeedsSetOutputSurfaceWorkaround(codecInfo.name)
&& (!codecInfo.secure || DummySurface.isSecureSupported(context));
}
private void setJoiningDeadlineMs() {
joiningDeadlineMs = allowedJoiningTimeMs > 0
? (SystemClock.elapsedRealtime() + allowedJoiningTimeMs) : C.TIME_UNSET;
......@@ -1171,6 +1172,12 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
return Util.SDK_INT <= 22 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER);
}
private static boolean codecNeedsDummySurfaceWorkaround(String name) {
// Work around https://github.com/google/ExoPlayer/issues/4419.
return (("needle".equals(Util.DEVICE)) // FireTV 4K
&& "OMX.amlogic.avc.decoder.awesome".equals(name));
}
/**
* Returns whether the device is known to implement {@link MediaCodec#setOutputSurface(Surface)}
* incorrectly.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment