From d3e79077dc85048d709291c1292b373934ced89f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 8 Mar 2024 17:05:34 +1100 Subject: [PATCH] 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: --- .../gstreamer/plugins/elements/gstidentity.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/subprojects/gstreamer/plugins/elements/gstidentity.c b/subprojects/gstreamer/plugins/elements/gstidentity.c index ab577b7e62..e3063b9327 100644 --- a/subprojects/gstreamer/plugins/elements/gstidentity.c +++ b/subprojects/gstreamer/plugins/elements/gstidentity.c @@ -569,14 +569,16 @@ gst_identity_src_event (GstBaseTransform * trans, GstEvent * event) &start, &stop_type, &stop); GST_OBJECT_LOCK (identity); - 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, - event); - GST_OBJECT_UNLOCK (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 handle %" GST_PTR_FORMAT, + event); + GST_OBJECT_UNLOCK (identity); - return FALSE; + return FALSE; + } } GST_OBJECT_UNLOCK (identity);