From 665627c3843ebf7a83e62e2f01f9e663a1dad32e Mon Sep 17 00:00:00 2001 From: olly Date: Wed, 23 Oct 2019 19:27:17 +0100 Subject: [PATCH] Rollback of https://github.com/google/ExoPlayer/commit/bf01ff0f60930427cb8a31e88fcad009d89132cc *** Original commit *** Use Float.NaN for Cue#DIMEN_UNSET Float.MIN_VALUE is very close to zero: "A constant holding the smallest positive nonzero value of type float" https://developer.android.com/reference/java/lang/Float.html#MIN_VALUE Float.NaN more clearly conveys this is an invalid number, and will also more clearly carry over if we do maths on it accidentally. *** PiperOrigin-RevId: 276315786 --- .../src/main/java/com/google/android/exoplayer2/text/Cue.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java b/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java index 9aaa127819..3dea9417c5 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java @@ -33,8 +33,7 @@ public class Cue { public static final Cue EMPTY = new Cue(""); /** An unset position or width. */ - // Note: We deliberately don't use Float.MIN_VALUE because it's positive & very close to zero. - public static final float DIMEN_UNSET = Float.NaN; + public static final float DIMEN_UNSET = Float.MIN_VALUE; /** * The type of anchor, which may be unset. One of {@link #TYPE_UNSET}, {@link #ANCHOR_TYPE_START},