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

Commit a0846251 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...

Merge "media: avoid recursion when evaluating profile support" into nyc-dev am: a72a83a1 am: bf3d1fc2
am: d3560d6c

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

Change-Id: I32a3f8c7d7f96ced191790ddfacb4405d9474a27
parents 1fad63cf d3560d6c
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;
                }
            }