You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1° problem:
from PR #1867 has been added InsertLiveSegment call inside AdaptiveStream::waitingForSegment
this is good when called from CSession::GetNextSample
but this cause wrong things when called from demuxers
what happens, the demuxer try to read data from a segment, and if there is no segment AdaptiveStream::ensureSegment set IsWaitForSegment on the representation to "true", after this the demuxer call AdaptiveStream::waitingForSegment to check if has to trigger EOS, but calling AdaptiveStream::waitingForSegment cause to call InsertLiveSegment that invalidate the IsWaitForSegment status previously set
so the demuxers must not cause a call to InsertLiveSegment
2° problem:
when there are no new segments CSession::GetNextSample call AdaptiveStream::waitingForSegment to call InsertLiveSegment, but if InsertLiveSegment at the moment dont insert new segments, cause a "cat and mice" behaviour like the following:
2026-06-24 18:21:26.417 T:20052 debug <inputstream.adaptive>: adaptive::AdaptiveStream::ensureSegment: [AS-1] Begin WaitForSegment stream rep. id "pa3" period id "1"
2026-06-24 18:21:26.684 T:29408 debug <inputstream.adaptive>: adaptive::CDashTree::InsertLiveSegment: End WaitForSegment repr. id pa3
2026-06-24 18:21:26.685 T:20052 debug <inputstream.adaptive>: adaptive::AdaptiveStream::ensureSegment: [AS-1] Begin WaitForSegment stream rep. id "pa3" period id "1"
2026-06-24 18:21:27.184 T:29408 debug <inputstream.adaptive>: adaptive::CDashTree::InsertLiveSegment: End WaitForSegment repr. id pa3
2026-06-24 18:21:27.185 T:20052 debug <inputstream.adaptive>: adaptive::AdaptiveStream::ensureSegment: [AS-1] Begin WaitForSegment stream rep. id "pa3" period id "1"
2026-06-24 18:21:27.684 T:29408 debug <inputstream.adaptive>: adaptive::CDashTree::InsertLiveSegment: End WaitForSegment repr. id pa3
2026-06-24 18:21:27.685 T:20052 debug <inputstream.adaptive>: adaptive::AdaptiveStream::ensureSegment: [AS-1] Begin WaitForSegment stream rep. id "pa3" period id "1"
2026-06-24 18:21:28.184 T:29408 debug <inputstream.adaptive>: adaptive::CDashTree::InsertLiveSegment: End WaitForSegment repr. id pa3
between ensureSegment and InsertLiveSegment, so i add a check to InsertLiveSegment to set IsWaitForSegment to false on the representation only when a new segment exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
1° problem:
from PR #1867 has been added
InsertLiveSegmentcall insideAdaptiveStream::waitingForSegmentthis is good when called from
CSession::GetNextSamplebut this cause wrong things when called from demuxers
what happens, the demuxer try to read data from a segment, and if there is no segment
AdaptiveStream::ensureSegmentset IsWaitForSegment on the representation to "true", after this the demuxer callAdaptiveStream::waitingForSegmentto check if has to trigger EOS, but callingAdaptiveStream::waitingForSegmentcause to callInsertLiveSegmentthat invalidate the IsWaitForSegment status previously setso the demuxers must not cause a call to
InsertLiveSegment2° problem:
when there are no new segments
CSession::GetNextSamplecallAdaptiveStream::waitingForSegmentto callInsertLiveSegment, but ifInsertLiveSegmentat the moment dont insert new segments, cause a "cat and mice" behaviour like the following:between ensureSegment and InsertLiveSegment, so i add a check to InsertLiveSegment to set IsWaitForSegment to false on the representation only when a new segment exists
Motivation and context
fix #2075
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: