diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index f161315c79..e9256a40e9 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -152,7 +152,6 @@ _m3u8_copy (const GstM3U8 * self) dup->iframe_lists = g_list_copy_deep (self->iframe_lists, (GCopyFunc) _m3u8_copy, NULL); /* NOTE: current_variant will get set in gst_m3u8_copy () */ - dup->mediasequence = self->mediasequence; return dup; } @@ -374,6 +373,7 @@ gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data, gboolean have_iv = FALSE; guint8 iv[16] = { 0, }; gint64 size = -1, offset = -1; + gint64 mediasequence; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (data != NULL, FALSE); @@ -408,7 +408,7 @@ gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data, self->files = NULL; } client->duration = GST_CLOCK_TIME_NONE; - self->mediasequence = 0; + mediasequence = 0; /* By default, allow caching */ self->allowcache = TRUE; @@ -452,9 +452,7 @@ gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data, list = NULL; } else { GstM3U8MediaFile *file; - file = - gst_m3u8_media_file_new (data, title, duration, - self->mediasequence++); + file = gst_m3u8_media_file_new (data, title, duration, mediasequence++); /* set encryption params */ file->key = current_key ? g_strdup (current_key) : NULL; @@ -595,7 +593,7 @@ gst_m3u8_update (GstM3U8Client * client, GstM3U8 * self, gchar * data, self->targetduration = val * GST_SECOND; } else if (g_str_has_prefix (data_ext_x, "MEDIA-SEQUENCE:")) { if (int_from_string (data + 22, &data, &val)) - self->mediasequence = val; + mediasequence = val; } else if (g_str_has_prefix (data_ext_x, "DISCONTINUITY")) { discontinuity = TRUE; } else if (g_str_has_prefix (data_ext_x, "PROGRAM-DATE-TIME:")) { diff --git a/ext/hls/m3u8.h b/ext/hls/m3u8.h index 7c8ac095c1..d9e6222963 100644 --- a/ext/hls/m3u8.h +++ b/ext/hls/m3u8.h @@ -71,7 +71,6 @@ struct _GstM3U8 GList *lists; /* list of GstM3U8 from the main playlist */ GList *iframe_lists; /* I-frame lists from the main playlist */ GList *current_variant; /* Current variant playlist used */ - gint64 mediasequence; /* EXT-X-MEDIA-SEQUENCE & increased with new media file */ }; struct _GstM3U8MediaFile