rtsp-media: Force seek when flush flag is set

The commit "rtsp-client: define all seek accuracy flags from
setup_play_mode" changed the behaviour of when doing a seek.

Before that commit, having the flush flag set would result in a seek
(forced seek).
Even if no seek was needed. One reason to force seek is to flush old buffers
created in Describe requests.

Thus adding force seek also for flush flag will result in play request
with fresh buffers.
This commit is contained in:
Kristofer Bjorkstrom 2019-12-06 10:44:35 +01:00
parent 8de843733d
commit faf8f87a02

View file

@ -2817,9 +2817,10 @@ gst_rtsp_media_seek_trickmode (GstRTSPMedia * media,
if (stop != GST_CLOCK_TIME_NONE)
stop_type = GST_SEEK_TYPE_SET;
/* we force a seek if any trickmode flag is set, or if the rate
* is non-standard, i.e. not 1.0 */
force_seek = (flags & TRICKMODE_FLAGS) || rate != 1.0;
/* we force a seek if any trickmode flag is set, or if the flush flag is set or
* the rate is non-standard, i.e. not 1.0 */
force_seek = (flags & TRICKMODE_FLAGS) || (flags & GST_SEEK_FLAG_FLUSH) ||
rate != 1.0;
if (start != GST_CLOCK_TIME_NONE || stop != GST_CLOCK_TIME_NONE || force_seek) {
GST_INFO ("seeking to %" GST_TIME_FORMAT " - %" GST_TIME_FORMAT,