diff options
author | Thomas Bluemel <tbluemel@control4.com> | 2016-10-10 16:41:15 -0600 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-03-02 19:05:57 +0200 |
commit | 9ce5646a0fe786d42c3cbb26e5a1dab43dec7c12 (patch) | |
tree | 684dd9dcc62c2edcbd1c131ffe833cb3916a970a /ext/hls | |
parent | 8d10d29c2420c2580686d68316eca2ff326b5272 (diff) | |
download | gstreamer-plugins-bad-9ce5646a0fe786d42c3cbb26e5a1dab43dec7c12.tar.gz |
hlsdemux: Add support for EXT-X-DISCONTINUITY-SEQUENCE
https://bugzilla.gnome.org/show_bug.cgi?id=772811
Diffstat (limited to 'ext/hls')
-rw-r--r-- | ext/hls/m3u8.c | 9 | ||||
-rw-r--r-- | ext/hls/m3u8.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index 316b0214b..6cc7a715c 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -599,7 +599,14 @@ gst_m3u8_update (GstM3U8 * self, gchar * data) mediasequence = val; have_mediasequence = TRUE; } - } else if (g_str_has_prefix (data_ext_x, "DISCONTINUITY")) { + } else if (g_str_has_prefix (data_ext_x, "DISCONTINUITY-SEQUENCE:")) { + if (int_from_string (data + 30, &data, &val) + && val != self->discont_sequence) { + self->discont_sequence = val; + discontinuity = TRUE; + } + } else if (g_str_has_prefix (data_ext_x, "DISCONTINUITY:")) { + self->discont_sequence++; discontinuity = TRUE; } else if (g_str_has_prefix (data_ext_x, "PROGRAM-DATE-TIME:")) { /* <YYYY-MM-DDThh:mm:ssZ> */ diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h index 3a5023b3b..195ec2ab8 100644 --- a/ext/hls/m3u8.h +++ b/ext/hls/m3u8.h @@ -74,6 +74,7 @@ struct _GstM3U8 GstClockTime first_file_start; /* timecode of the start of the first fragment in the current media playlist */ GstClockTime last_file_end; /* timecode of the end of the last fragment in the current media playlist */ GstClockTime duration; /* cached total duration */ + gint discont_sequence; /* currently expected EXT-X-DISCONTINUITY-SEQUENCE */ /*< private > */ gchar *last_data; |