summaryrefslogtreecommitdiff
path: root/ext/hls/gsthlsdemux.c
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-05-24 15:23:12 +0200
committerJan Schmidt <jan@centricular.com>2016-08-03 23:49:54 +1000
commit4704634f43cd3ea97fa6edd282fb687e7d2cf0ee (patch)
treeea7fed3d73aff6d1b7546216fdee9b465419211a /ext/hls/gsthlsdemux.c
parent1d4eb71a05c27fa66e53b949f9cce836d41c8b87 (diff)
downloadgstreamer-plugins-bad-4704634f43cd3ea97fa6edd282fb687e7d2cf0ee.tar.gz
hlsdemux: don't download the last fragment when seeking beyond the end of the track
It's not used anyways.
Diffstat (limited to 'ext/hls/gsthlsdemux.c')
-rw-r--r--ext/hls/gsthlsdemux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index 8f1035703..0c20d9d47 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -299,7 +299,7 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
GstSeekType start_type, stop_type;
gint64 start, stop;
gdouble rate, old_rate;
- GList *walk, *current_file = NULL;
+ GList *walk;
GstClockTime current_pos, target_pos;
gint64 current_sequence;
GstM3U8MediaFile *file;
@@ -368,7 +368,6 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
file = walk->data;
current_sequence = file->sequence;
- current_file = walk;
if ((!reverse && snap_after) || snap_nearest) {
if (current_pos >= target_pos)
break;
@@ -398,8 +397,7 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
for (walk = demux->streams; walk != NULL; walk = walk->next)
GST_HLS_DEMUX_STREAM_CAST (walk->data)->reset_pts = TRUE;
hlsdemux->current_variant->m3u8->sequence = current_sequence;
- hlsdemux->current_variant->m3u8->current_file =
- current_file ? current_file : hlsdemux->current_variant->m3u8->files;
+ hlsdemux->current_variant->m3u8->current_file = walk;
hlsdemux->current_variant->m3u8->sequence_position = current_pos;
GST_M3U8_CLIENT_UNLOCK (hlsdemux->client);