dashdemux: include both Period start and presentationTimeOffset in segment start
authorAlex Ashley <bugzilla@ashley-family.net>
Tue, 16 Oct 2018 15:57:30 +0000 (16:57 +0100)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Sat, 1 Jun 2019 21:25:33 +0000 (21:25 +0000)
commita11f7ed9244a6af9f1e77154e0a19e1462ec77d2
tree31e30fa00c2dcb0fd5c58fd1447287cdbbab0fb8
parent51ea6ec6b7f2d346eee02904f649ae190e738145
dashdemux: include both Period start and presentationTimeOffset in segment start

The start of each segment is relative to the Period start, minus
the presentation time offset.

As specified in section 5.3.9.6 of the MPEG DASH specification:
    The value of the @t attribute minus the value of the
    @presentationTimeOffset specifies the MPD start time of
    the first Segment in the series.

dashdemux was not taking account of presentationTimeOffset and in
some methods was not taking into account the Period start time.
This commit modifies the segment->start value to always be
relative to the MPD start time (zero for VOD,
availabilityStartTime for live streams). This makes all uses of
the segment list consistent.

Fixes #841
ext/dash/gstmpdparser.c
tests/check/elements/dash_mpd.c