duration calculated from segmentIndex mismatches whats available in periodInfo #187
Labels
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
I have the following MPD
The
<MPD>
tag has themediaPresentationDuration="PT1M3.7S"
signifying the video is ~63 seconds. However when loading the video, it reports the duration as ~65 seconds which it is calculating byinside
shaka.player.StreamVideoSource.prototype.computeStreamLimits_
As there are 13 available segments, it multiplies by 5s per segment, giving a total of 65s.
The last segment is however not a full 5s segment, so when the playback ends, it throws a warning from the
else
clause ofshaka.player.StreamVideoSource.prototype.setUpMediaSource_
If I now add
duration="PT1M3.7S"
to the<Period>
tag in the MPD, it still has the same issue, since fetching duration from theperiodInfo
happens after calculating it from thesegmentIndex
insideshaka.player.StreamVideoSource.prototype.computeStreamLimits_
and is protected by aendTime == Number.POSITIVE_INFINITY
check.Questions:
mediaPresentationDuration="PT1M3.7S"
to figure out the number of segments =var numSegments = Math.ceil(this.period_.duration / scaledSegmentDuration);
= 1M3.7S / 5S = 13. However if it is doing that, shouldn't it know that the 13th segment is only seekable to 3.7s and not the total 5s? And why is this duration not being used as opposed to recalculating it again by iterating over all the segments?mediaPresentationDuration="PT1M3.7S"
as the duration incase its not available on the<Period>
tag?Thanks!
The text was updated successfully, but these errors were encountered: