diff options
author | Seungha Yang <sh.yang@lge.com> | 2017-01-24 20:21:19 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-01-31 13:23:34 +0200 |
commit | e9e6e4a4f64379a28247954277ab311d5b96045e (patch) | |
tree | 43cbdd253da77e4c54d6c70021af02175eda4f35 | |
parent | 09835b3d2734107cb90554922c71b114f56cfc33 (diff) | |
download | gstreamer-plugins-bad-e9e6e4a4f64379a28247954277ab311d5b96045e.tar.gz |
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
-rw-r--r-- | ext/hls/gsthlsdemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 3e82d58e9..44be04e50 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -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; |