mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Short term fix for setFrameRate ISE when surface is not valid
PiperOrigin-RevId: 340314496
This commit is contained in:
parent
2c7473dc05
commit
e139a4652a
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||||
surface.setFrameRate(frameRate, compatibility);
|
try {
|
||||||
|
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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue