Skip to content

Commit 512ca60

Browse files
committed
Add workaround for wrong PerformancePoints on some devices.
Some devices were reported to have wrong PerformancePoint sets that cause 60 fps to be marked as unsupported even though they are supported. Issue: google/ExoPlayer#10898 PiperOrigin-RevId: 512580395 (cherry picked from commit d0cbf0f)
1 parent f011cc8 commit 512ca60

2 files changed

Lines changed: 23 additions & 11 deletions

File tree

‎RELEASENOTES.md‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
* Video:
3131
* Map HEVC HDR10 format to `HEVCProfileMain10HDR10` instead of
3232
`HEVCProfileMain10`.
33-
* DASH:
33+
* Add workaround for a device issue on Chromecast with Google TV and
34+
Lenovo M10 FHD Plus that causes 60fps AVC streams to be marked as
35+
unsupported
36+
([#10898](https://github.com/google/ExoPlayer/issues/10898)).
37+
* DASH:
3438
* Add full parsing for image adaptation sets, including tile counts
3539
([#3752](https://github.com/google/ExoPlayer/issues/3752)).
3640
* RTSP:
@@ -94,15 +98,10 @@ This release corresponds to the
9498
parsing trak atoms.
9599
* Correctly skip samples when seeking directly to a sync frame in fMP4
96100
([#10941](https://github.com/google/ExoPlayer/issues/10941)).
97-
* Fix `NullPointerException` when calling `ExoPlayer.isTunnelingEnabled`
98-
([#10977](https://github.com/google/ExoPlayer/issues/10977)).
99-
* Audio:
100-
* Use the compressed audio format bitrate to calculate the min buffer size
101+
* Audio:
102+
* Use the compressed audio format bitrate to calculate the min buffer size
101103
for `AudioTrack` in direct playbacks (passthrough).
102-
* Fix bug where some playbacks fail when tunneling is enabled and
103-
`AudioProcessors` are active, e.g. for gapless trimming
104-
([#10847](https://github.com/google/ExoPlayer/issues/10847)).
105-
* Text:
104+
* Text:
106105
* Fix `TextRenderer` passing an invalid (negative) index to
107106
`Subtitle.getEventTime` if a subtitle file contains no cues.
108107
* SubRip: Add support for UTF-16 files if they start with a byte order

‎libraries/exoplayer/src/main/java/androidx/media3/exoplayer/mediacodec/MediaCodecInfo.java‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ private static boolean needsAdaptationFlushWorkaround(String mimeType) {
857857
* @param name The name of the codec.
858858
* @return Whether to enable the workaround.
859859
*/
860-
private static final boolean needsRotatedVerticalResolutionWorkaround(String name) {
860+
private static boolean needsRotatedVerticalResolutionWorkaround(String name) {
861861
if ("OMX.MTK.VIDEO.DECODER.HEVC".equals(name) && "mcv5a".equals(Util.DEVICE)) {
862862
// See https://github.com/google/ExoPlayer/issues/6612.
863863
return false;
@@ -876,6 +876,17 @@ private static boolean needsProfileExcludedWorkaround(String mimeType, int profi
876876
&& ("sailfish".equals(Util.DEVICE) || "marlin".equals(Util.DEVICE));
877877
}
878878

879+
/** Whether the device is known to have wrong {@link PerformancePoint} declarations. */
880+
private static boolean needsIgnorePerformancePointsWorkaround() {
881+
// See https://github.com/google/ExoPlayer/issues/10898 and [internal ref: b/267324685].
882+
return /* Chromecast with Google TV */ Util.DEVICE.equals("sabrina")
883+
|| Util.DEVICE.equals("boreal")
884+
/* Lenovo Tablet M10 FHD Plus */
885+
|| Util.MODEL.startsWith("Lenovo TB-X605")
886+
|| Util.MODEL.startsWith("Lenovo TB-X606")
887+
|| Util.MODEL.startsWith("Lenovo TB-X616");
888+
}
889+
879890
/** Possible outcomes of evaluating PerformancePoint coverage */
880891
@Documented
881892
@Retention(RetentionPolicy.SOURCE)
@@ -900,7 +911,9 @@ private static final class Api29 {
900911
VideoCapabilities videoCapabilities, int width, int height, double frameRate) {
901912
List<PerformancePoint> performancePointList =
902913
videoCapabilities.getSupportedPerformancePoints();
903-
if (performancePointList == null || performancePointList.isEmpty()) {
914+
if (performancePointList == null
915+
|| performancePointList.isEmpty()
916+
|| needsIgnorePerformancePointsWorkaround()) {
904917
return COVERAGE_RESULT_NO_EMPTY_LIST;
905918
}
906919

0 commit comments

Comments
 (0)