Set KEY_FRAME_RATE for devices where KEY_OPERATING_RATE silently fails

This commit is contained in:
Cameron Gutman 2020-02-22 01:05:26 -08:00
parent dca3e89303
commit 68a6b510b1

View File

@ -303,6 +303,8 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
MediaFormat videoFormat = MediaFormat.createVideoFormat(mimeType, width, height);
videoFormat.setInteger(MediaFormat.KEY_FRAME_RATE, redrawRate);
// Adaptive playback can also be enabled by the whitelist on pre-KitKat devices
// so we don't fill these pre-KitKat
if (adaptivePlayback && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {