From dfa31f02e37aeef73c85cd668ca0877ef8a23984 Mon Sep 17 00:00:00 2001 From: cblay Date: Tue, 20 Mar 2018 12:10:15 -0700 Subject: [PATCH] DashMediaSource: Do not use TIME_UNSET publishTime to check for stale dynamic manifest Also convert left side from milliseconds to microseconds for comparison ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189784833 --- .../google/android/exoplayer2/source/dash/DashMediaSource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java index a07f7a3d83..95dcb45fde 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java @@ -639,7 +639,8 @@ public final class DashMediaSource extends BaseMediaSource { Log.w(TAG, "Loaded out of sync manifest"); isManifestStale = true; } else if (dynamicMediaPresentationEnded - || newManifest.publishTimeMs <= expiredManifestPublishTimeUs) { + || (expiredManifestPublishTimeUs != C.TIME_UNSET + && newManifest.publishTimeMs * 1000 <= expiredManifestPublishTimeUs)) { // If we receive a dynamic manifest that's older than expected (i.e. its publish time has // expired, or it's dynamic and we know the presentation has ended), then this manifest is // stale.