hlsdemux2: Handle negative time mappings
authorEdward Hervey <edward@centricular.com>
Thu, 15 Sep 2022 07:04:10 +0000 (09:04 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Sep 2022 14:34:34 +0000 (14:34 +0000)
commitfdfa70997b162c9bafe4aecb0ebd2456b1c67320
treeea9f088a5ef2aa9aca07f6f0a3dc206d45911522
parent7167721caccf1872191920aae42594200e736c21
hlsdemux2: Handle negative time mappings

Some servers can return playlists with "old" media playlists and different
Discont Sequence.

In those cases, the segment stream times would be negative when creating a new
time mapping. In order to properly handle such scenarios, shift the values to
stored accordingly to end up with non-negative reference stream time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3054>
subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c