identity: Don't refuse seeks unless single-segment=true

identity only needs to configure the internal seek segment if it's
aggregating upstream segments into 1. If it's not, don't break
other seek behaviour by refusing (for example) instant-rate change
seeks.

Fixes: #3363
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6299>
This commit is contained in:
Jan Schmidt 2024-03-08 17:05:34 +11:00
parent 5b3082257e
commit d3e79077dc

View file

@ -569,15 +569,17 @@ gst_identity_src_event (GstBaseTransform * trans, GstEvent * event)
&start, &stop_type, &stop);
GST_OBJECT_LOCK (identity);
if (identity->single_segment) {
gst_segment_init (&identity->seek_segment, fmt);
if (!gst_segment_do_seek (&identity->seek_segment, rate, fmt,
flags, start_type, start, stop_type, stop, NULL)) {
GST_WARNING_OBJECT (identity, "Could not run seek %" GST_PTR_FORMAT,
GST_WARNING_OBJECT (identity, "Could not handle %" GST_PTR_FORMAT,
event);
GST_OBJECT_UNLOCK (identity);
return FALSE;
}
}
GST_OBJECT_UNLOCK (identity);
break;