From ccb337f2e14d8e1c0ebeb89e131dcce3207e2948 Mon Sep 17 00:00:00 2001 From: kimvde Date: Fri, 3 Jul 2020 11:43:28 +0100 Subject: [PATCH] MP4: set TrackSampleTable to 0 when there are no samples Because the stbl atom is mandatory, there is no reason for having a special C.TIME_UNSET value instead of 0. PiperOrigin-RevId: 319496999 --- .../google/android/exoplayer2/extractor/mp4/AtomParsers.java | 2 +- .../android/exoplayer2/extractor/mp4/TrackSampleTable.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java index 13ffcc2ff1..a20776595e 100644 --- a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java +++ b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java @@ -315,7 +315,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType; /* maximumSize= */ 0, /* timestampsUs= */ new long[0], /* flags= */ new int[0], - /* durationUs= */ C.TIME_UNSET); + /* durationUs= */ 0); } // Entries are byte offsets of chunks. diff --git a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackSampleTable.java b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackSampleTable.java index 59ea386335..ca500b2931 100644 --- a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackSampleTable.java +++ b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackSampleTable.java @@ -38,10 +38,7 @@ import com.google.android.exoplayer2.util.Util; public final long[] timestampsUs; /** Sample flags. */ public final int[] flags; - /** - * The duration of the track sample table in microseconds, or {@link C#TIME_UNSET} if the sample - * table is empty. - */ + /** The duration of the track sample table in microseconds. */ public final long durationUs; public TrackSampleTable(