Update dash chunk source to handle in-progressive recording dash stream.

Using calculated segments timeline duration to compare with period duration to update whether period has reach it the end of stream.
This commit is contained in:
zgzong 2023-07-18 16:48:40 +01:00 committed by tonihei
parent 670658f3ae
commit fb847cad66

View File

@ -420,6 +420,10 @@ public class DefaultDashChunkSource implements DashChunkSource {
long firstAvailableSegmentNum = representationHolder.getFirstAvailableSegmentNum(nowUnixTimeUs);
long lastAvailableSegmentNum = representationHolder.getLastAvailableSegmentNum(nowUnixTimeUs);
if(manifest.dynamic) {
long lastAvailableSegmentEndTimeUs = representationHolder.getSegmentEndTimeUs(lastAvailableSegmentNum);
periodEnded &= (lastAvailableSegmentEndTimeUs >= periodDurationUs);
}
long segmentNum =
getSegmentNum(
representationHolder,