Skip to content

Commit

Permalink
allow chapter duration of 0
Browse files Browse the repository at this point in the history
There can be segments with just chapters containing commands.

In ordered chapters the content will not play anything, it may seek to the
position for nothing but that's not a big deal.

Fixes #542
  • Loading branch information
robUx4 committed Aug 27, 2021
1 parent e6cb2d0 commit bea2e02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chapters.md
Expand Up @@ -110,13 +110,13 @@ The timestamp of the end of `Chapter` with nanosecond accuracy, not scaled by Ti
The timestamp defined by the `ChapterTimeEnd` is not part of the `Chapter`.
A `Matroska Player` calculates the duration of this `Chapter` using the difference between the
`ChapterTimeEnd` and `ChapterTimeStart`.
The end timestamp **MUST** be strictly greater than the start timestamp.
The end timestamp **MUST** be greater or equal than the start timestamp.

Chapter | Start timestamp | End timestamp | Duration
:---------|:----------------|:--------------|:-----
Chapter 1 | 0 | 1000000000 | 1000000000
Chapter 2 | 1000000000 | 5000000000 | 4000000000
Chapter 3 | 6000000000 | 6000000000 | Invalid (0)
Chapter 3 | 6000000000 | 6000000000 | 0
Chapter 4 | 9000000000 | 8000000000 | Invalid (-1000000000)
Table: ChapterTimeEnd usage possibilities{#ChapterTimeEndUsage}

Expand Down
2 changes: 1 addition & 1 deletion ebml_matroska.xml
Expand Up @@ -1160,7 +1160,7 @@ Use for WebVTT cue identifier storage [@!WebVTT].</documentation>
</element>
<element name="ChapterTimeEnd" path="\Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd" id="0x92" type="uinteger" maxOccurs="1">
<documentation lang="en" purpose="definition">Timestamp of the end of Chapter (timestamp excluded, not scaled).
The value **MUST** be strictly greater than the `ChapterTimeStart` of the same `ChapterAtom`.</documentation>
The value **MUST** be greater or equal the `ChapterTimeStart` of the same `ChapterAtom`.</documentation>
<documentation lang="en" purpose="usage notes">If the Edition is an ordered edition, see (#editionflagordered), then this Element is **REQUIRED**.</documentation>
<extension type="webmproject.org" webm="1"/>
</element>
Expand Down

0 comments on commit bea2e02

Please sign in to comment.