From c29883d2a18de30ef2f07dfdbd2bf128028109d9 Mon Sep 17 00:00:00 2001 From: Yuriy Liskov Date: Thu, 11 Aug 2022 05:10:41 +0300 Subject: [PATCH] player: dash live stream: recreate missing segments: fix2 --- .../common/exoplayer/LiveDashManifestParser.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 b214058fe..47de75784 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 @@ -194,13 +194,14 @@ public class LiveDashManifestParser extends DashManifestParser { return; } + // TODO: remove fix below + if (minUpdatePeriodMs <= 2_000) { + return; // url won't work on small (2_000Ms) segments + } + if (timeShiftBufferDepthMs > 0) { // active live stream Helpers.setField(manifest, "timeShiftBufferDepthMs", timeShiftBufferDepthMs + (segmentCount * minUpdatePeriodMs)); } else { // past live stream - // TODO: remove fix below - if (minUpdatePeriodMs <= 2_000) { - return; // first segments won't work for some reasons - } Helpers.setField(manifest, "durationMs", durationMs + (segmentCount * minUpdatePeriodMs)); }