mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
mssdemux: only update download position if the seek requests to
Some seeks are only updating the stop position, there is no need to change the current downloading position.
This commit is contained in:
parent
86fb14f5ed
commit
1b12d7f8a3
1 changed files with 6 additions and 1 deletions
|
@ -586,6 +586,10 @@ gst_mss_demux_stream_select_bitrate (GstAdaptiveDemuxStream * stream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define SEEK_UPDATES_PLAY_POSITION(r, start_type, stop_type) \
|
||||
((r >= 0 && start_type != GST_SEEK_TYPE_NONE) || \
|
||||
(r < 0 && stop_type != GST_SEEK_TYPE_NONE))
|
||||
|
||||
static gboolean
|
||||
gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
|
||||
{
|
||||
|
@ -603,7 +607,8 @@ gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
|
|||
"seek event, rate: %f start: %" GST_TIME_FORMAT " stop: %"
|
||||
GST_TIME_FORMAT, rate, GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
|
||||
|
||||
gst_mss_manifest_seek (mssdemux->manifest, start);
|
||||
if (SEEK_UPDATES_PLAY_POSITION (rate, start_type, stop_type))
|
||||
gst_mss_manifest_seek (mssdemux->manifest, start);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue