Treat Dolby Vision as H264 in MCVR#getCodecMaxInputSize()

Issue: #8705
PiperOrigin-RevId: 364821429
This commit is contained in:
ibaker 2021-03-24 16:30:48 +00:00 committed by marcbaechinger
parent d102b932fe
commit 14711d1fb2
2 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,9 @@
* Fix playback position issue when re-preparing playback after a * Fix playback position issue when re-preparing playback after a
BehindLiveWindowException BehindLiveWindowException
([#8675](https://github.com/google/ExoPlayer/issues/8675)). ([#8675](https://github.com/google/ExoPlayer/issues/8675)).
* Assume Dolby Vision content is encoded as H264 when calculating maximum
codec input size
([#8705](https://github.com/google/ExoPlayer/issues/8705)).
* HLS: * HLS:
* Fix issue that could cause playback to become stuck if corresponding * Fix issue that could cause playback to become stuck if corresponding
`EXT-X-DISCONTINUITY` tags in different media playlists occur at `EXT-X-DISCONTINUITY` tags in different media playlists occur at

View File

@ -1488,6 +1488,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
maxPixels = width * height; maxPixels = width * height;
minCompressionRatio = 2; minCompressionRatio = 2;
break; break;
case MimeTypes.VIDEO_DOLBY_VISION:
// Dolby vision can be a wrapper around H264 or H265. We assume H264 here because the
// minimum compression ratio is lower, meaning we overestimate the maximum input size.
case MimeTypes.VIDEO_H264: case MimeTypes.VIDEO_H264:
if ("BRAVIA 4K 2015".equals(Util.MODEL) // Sony Bravia 4K if ("BRAVIA 4K 2015".equals(Util.MODEL) // Sony Bravia 4K
|| ("Amazon".equals(Util.MANUFACTURER) || ("Amazon".equals(Util.MANUFACTURER)