Exclude HEVC 10bit profile on Pixel 1.
This profile is declared as supported although it isn't. Issue: google/ExoPlayer#10345 Issue: google/ExoPlayer#3537 #minor-release PiperOrigin-RevId: 459205512
This commit is contained in:
parent
0a9f9007c6
commit
656eaf74d1
@ -317,7 +317,9 @@ public final class MediaCodecInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (CodecProfileLevel profileLevel : profileLevels) {
|
for (CodecProfileLevel profileLevel : profileLevels) {
|
||||||
if (profileLevel.profile == profile && profileLevel.level >= level) {
|
if (profileLevel.profile == profile
|
||||||
|
&& profileLevel.level >= level
|
||||||
|
&& !needsProfileExcludedWorkaround(mimeType, profile)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -831,4 +833,15 @@ public final class MediaCodecInfo {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether a profile is excluded from the list of supported profiles. This may happen when a
|
||||||
|
* device declares support for a profile it doesn't actually support.
|
||||||
|
*/
|
||||||
|
private static boolean needsProfileExcludedWorkaround(String mimeType, int profile) {
|
||||||
|
// See https://github.com/google/ExoPlayer/issues/3537
|
||||||
|
return MimeTypes.VIDEO_H265.equals(mimeType)
|
||||||
|
&& CodecProfileLevel.HEVCProfileMain10 == profile
|
||||||
|
&& ("sailfish".equals(Util.DEVICE) || "marlin".equals(Util.DEVICE));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user