gstsegment: Refuse instant-rate seeks in gst_segment_do_seek()

Elements that pass a seek with INSTANT_RATE flag to
gst_segment_do_seek() haven't been updated and we should
refuse the seek.
This commit is contained in:
Jan Schmidt 2019-11-22 23:55:56 +11:00 committed by GStreamer Merge Bot
parent 1b92672e3b
commit e98ccc7665

View file

@ -241,6 +241,11 @@ gst_segment_do_seek (GstSegment * segment, gdouble rate,
g_return_val_if_fail (segment != NULL, FALSE);
g_return_val_if_fail (segment->format == format, FALSE);
/* Elements should not pass instant-rate seeks to gst_segment_do_seek().
* This helps catch elements that have not been updated yet */
if (flags & GST_SEEK_FLAG_INSTANT_RATE_CHANGE)
return FALSE;
update_start = update_stop = TRUE;
position = segment->position;