hlsdemux: Add support for EXT-X-DISCONTINUITY-SEQUENCE

https://bugzilla.gnome.org/show_bug.cgi?id=772811
This commit is contained in:
Thomas Bluemel 2016-10-10 16:41:15 -06:00 committed by Sebastian Dröge
parent 8d10d29c24
commit 9ce5646a0f
2 changed files with 9 additions and 1 deletions

View file

@ -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> */

View file

@ -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;