mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
adaptivedemux: HTTP ranges are inclusive, GStreamer segment.stop is exclusive
Translate the values accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=748316
This commit is contained in:
parent
10085a5d01
commit
e523bd2a33
1 changed files with 4 additions and 0 deletions
|
@ -1927,6 +1927,10 @@ gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux,
|
|||
if (gst_element_set_state (stream->src,
|
||||
GST_STATE_READY) != GST_STATE_CHANGE_FAILURE) {
|
||||
if (start != 0 || end != -1) {
|
||||
/* HTTP ranges are inclusive, GStreamer segments are exclusive for the
|
||||
* stop position */
|
||||
if (end != -1)
|
||||
end += 1;
|
||||
if (!gst_element_send_event (stream->src, gst_event_new_seek (1.0,
|
||||
GST_FORMAT_BYTES, (GstSeekFlags) GST_SEEK_FLAG_FLUSH,
|
||||
GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, end))) {
|
||||
|
|
Loading…
Reference in a new issue