Fix handling of H.263 level 45
H.263 level 45 only supports QCIF, so we shouldn't treat it as "higher" than e.g. level 40, which also supports CIF. Bug: 147922039 Test: CTS Change-Id: I4a09b2362829b2f825dae7220155e14f54837b18
This commit is contained in:
@@ -763,7 +763,13 @@ public final class MediaCodecInfo {
|
||||
int maxLevel = 0;
|
||||
for (CodecProfileLevel pl : profileLevels) {
|
||||
if (pl.profile == profile && pl.level > maxLevel) {
|
||||
maxLevel = pl.level;
|
||||
// H.263 levels are not completely ordered:
|
||||
// Level45 support only implies Level10 support
|
||||
if (!mMime.equalsIgnoreCase(MediaFormat.MIMETYPE_VIDEO_H263)
|
||||
|| pl.level != CodecProfileLevel.H263Level45
|
||||
|| maxLevel == CodecProfileLevel.H263Level10) {
|
||||
maxLevel = pl.level;
|
||||
}
|
||||
}
|
||||
}
|
||||
levelCaps = createFromProfileLevel(mMime, profile, maxLevel);
|
||||
|
||||
Reference in New Issue
Block a user