From 4756aee807480d0531d52bea62a0d36d2aa6c445 Mon Sep 17 00:00:00 2001 From: Yuriy Liskov Date: Thu, 11 Aug 2022 03:18:17 +0300 Subject: [PATCH] player: dash live stream: recreate missing segments: fix --- .../common/exoplayer/LiveDashManifestParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/exoplayer/LiveDashManifestParser.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/exoplayer/LiveDashManifestParser.java index a9d519100..b214058fe 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/exoplayer/LiveDashManifestParser.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/exoplayer/LiveDashManifestParser.java @@ -190,6 +190,10 @@ public class LiveDashManifestParser extends DashManifestParser { segmentCount = Math.min(firstSegmentNum, maxSegmentsCount - (lastSegmentNum - firstSegmentNum - 1)); } + if (segmentCount <= 0) { + return; + } + if (timeShiftBufferDepthMs > 0) { // active live stream Helpers.setField(manifest, "timeShiftBufferDepthMs", timeShiftBufferDepthMs + (segmentCount * minUpdatePeriodMs)); } else { // past live stream