Commit 036a48dc by tonihei Committed by Rohit Singh

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
(cherry picked from commit bf88f285)
parent c2ddf277
......@@ -315,7 +315,9 @@ public final class MediaCodecInfo {
}
for (CodecProfileLevel profileLevel : profileLevels) {
if (profileLevel.profile == profile && profileLevel.level >= level) {
if (profileLevel.profile == profile
&& profileLevel.level >= level
&& !needsProfileExcludedWorkaround(mimeType, profile)) {
return true;
}
}
......@@ -829,4 +831,15 @@ public final class MediaCodecInfo {
}
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));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment