summaryrefslogtreecommitdiff
path: root/ext/hls/m3u8.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-11-15 17:31:05 +0000
committerTim-Philipp Müller <tim@centricular.com>2015-12-01 17:51:34 +0000
commit5443cca40686ee2084b340e867be2fffa45f9b6c (patch)
tree8c6c25b74e8a51702caf4ca340a731981c98ca52 /ext/hls/m3u8.c
parentefe62292a3d045126654d93239fdf4cc8e48ae08 (diff)
downloadgstreamer-plugins-bad-5443cca40686ee2084b340e867be2fffa45f9b6c.tar.gz
hls: m3u8: remove helper var that's only used during parsing from structure
Just keep that local to the parsing function.
Diffstat (limited to 'ext/hls/m3u8.c')
-rw-r--r--ext/hls/m3u8.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index f161315c7..e9256a40e 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:")) {