Commit e139a465 by olly Committed by Oliver Woodman

Short term fix for setFrameRate ISE when surface is not valid

PiperOrigin-RevId: 340314496
parent 2c7473dc
...@@ -1106,7 +1106,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer { ...@@ -1106,7 +1106,11 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
frameRate == 0 frameRate == 0
? Surface.FRAME_RATE_COMPATIBILITY_DEFAULT ? Surface.FRAME_RATE_COMPATIBILITY_DEFAULT
: Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE; : Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE;
try {
surface.setFrameRate(frameRate, compatibility); surface.setFrameRate(frameRate, compatibility);
} catch (IllegalStateException e) {
Log.e(TAG, "Failed to call Surface.setFrameRate", e);
}
} }
private boolean shouldUseDummySurface(MediaCodecInfo codecInfo) { private boolean shouldUseDummySurface(MediaCodecInfo codecInfo) {
......
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