Skip to content

Commit

Permalink
chore(DASH): Remove support for float durations.
Browse files Browse the repository at this point in the history
We previously supported float duration attributes in DASH
SegmentTemplate, due to an ambiguity in the DASH samples.

The code linked to a DASH IOP issue asking if duration could be a
float or it had to be an int.

That issue has since been closed, with the clarification that
duration attributes must be an unsigned int and the sample was
in violation of the spec.
  • Loading branch information
theodab committed Apr 30, 2024
1 parent 4365b84 commit 7af9d37
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/dash/mpd_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,6 @@ shaka.dash.MpdUtils = class {
const durationStr =
MpdUtils.inheritAttribute(context, callback, 'duration');
let segmentDuration = TXml.parsePositiveInt(durationStr || '');
const ContentType = shaka.util.ManifestParserUtils.ContentType;
// TODO: The specification is not clear, check this once it is resolved:
// https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/404
if (context.representation.contentType == ContentType.IMAGE) {
segmentDuration = TXml.parseFloat(durationStr || '');
}
if (segmentDuration) {
segmentDuration /= timescale;
}
Expand Down

0 comments on commit 7af9d37

Please sign in to comment.