hlsdemux: Consider timestamp of the first fragment in playlist when live seeking

During live playback, the first fragment in a updated
playlist can be advanced from that of startup playlist.
Meanwhile, since hlsdemux finds target seek position
by just accumulating fragment's duration, the base should
be adjusted to the updated first fragment's timestamp.

https://bugzilla.gnome.org/show_bug.cgi?id=777682
This commit is contained in:
Seungha Yang 2017-01-24 20:21:19 +09:00 committed by Sebastian Dröge
parent 09835b3d27
commit e9e6e4a4f6

View file

@ -356,7 +356,8 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
GstM3U8MediaFile *file = NULL;
current_sequence = 0;
current_pos = 0;
current_pos = gst_m3u8_is_live (hls_stream->playlist) ?
hls_stream->playlist->first_file_start : 0;
reverse = rate < 0;
target_pos = reverse ? stop : start;
target_type = reverse ? stop_type : start_type;