Disable H.264 constraint and level_idc modifications on Oreo and later

This commit is contained in:
Cameron Gutman
2026-09-01 21:01:41 -05:00
parent 3df0103a8c
commit 68adf9ecc9
@@ -1334,7 +1334,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
sps.constraintSet4Flag = true;
sps.constraintSet5Flag = true;
}
else {
else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
// Force the constraints unset otherwise (some may be set by default)
sps.constraintSet4Flag = false;
sps.constraintSet5Flag = false;
@@ -1438,7 +1438,7 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
// Since we only need one frame buffered, we'll set the level as low as we can
// for known resolution combinations. Reference frame invalidation may need
// these, so leave them be for those decoders.
if (!refFrameInvalidationActive) {
if (!refFrameInvalidationActive && Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
if (initialWidth <= 720 && initialHeight <= 480 && refreshRate <= 60) {
// Max 5 buffered frames at 720x480x60
LimeLog.info("Patching level_idc to 31");