Skip to content

Commit

Permalink
Treat Dolby Vision as H264 in MCVR#getCodecMaxInputSize()
Browse files Browse the repository at this point in the history
Issue: #8705
PiperOrigin-RevId: 364821429
  • Loading branch information
icbaker committed Mar 24, 2021
1 parent e1fec35 commit 94a4ed7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
object.
* `Player.setPlaybackParameters` no longer accepts null, use
`PlaybackParameters.DEFAULT` instead.
* Assume Dolby Vision content is encoded as H264 when calculating maximum
codec input size
([#8705](https://github.com/google/ExoPlayer/issues/8705)).
* HLS:
* Fix issue that could cause playback to become stuck if corresponding
`EXT-X-DISCONTINUITY` tags in different media playlists occur at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,9 @@ private static int getCodecMaxInputSize(
maxPixels = width * height;
minCompressionRatio = 2;
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:
if ("BRAVIA 4K 2015".equals(Util.MODEL) // Sony Bravia 4K
|| ("Amazon".equals(Util.MANUFACTURER)
Expand Down

0 comments on commit 94a4ed7

Please sign in to comment.