Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4da6b99 authored by Lajos Molnar's avatar Lajos Molnar Committed by android-build-merger
Browse files

Merge "media: avoid recursion when evaluating profile support" into nyc-dev

am: a72a83a1

* commit 'a72a83a1':
  media: avoid recursion when evaluating profile support

Change-Id: I2ba4a9e16b1989cb05291f9db2412c61bf3e2d07
parents 561df62a a72a83a1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -591,7 +591,12 @@ public final class MediaCodecInfo {
                    }
                }
                levelCaps = createFromProfileLevel(mMime, profile, maxLevel);
                if (levelCaps != null && !levelCaps.isFormatSupported(format)) {
                // remove profile from this format otherwise levelCaps.isFormatSupported will
                // get into this same conditon and loop forever.
                Map<String, Object> mapWithoutProfile = new HashMap<>(map);
                mapWithoutProfile.remove(MediaFormat.KEY_PROFILE);
                MediaFormat formatWithoutProfile = new MediaFormat(mapWithoutProfile);
                if (levelCaps != null && !levelCaps.isFormatSupported(formatWithoutProfile)) {
                    return false;
                }
            }