mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
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:
parent
5b3082257e
commit
d3e79077dc
1 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue