mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
pad: Copy over seqnum when creating a new segment event for applying pad offset
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6067>
This commit is contained in:
parent
23b88fe0f3
commit
8340ac5e0a
1 changed files with 3 additions and 0 deletions
|
@ -659,15 +659,18 @@ _apply_pad_offset (GstPad * pad, GstEvent * event, gboolean upstream,
|
|||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
|
||||
GstSegment segment;
|
||||
guint32 seqnum;
|
||||
|
||||
g_assert (!upstream);
|
||||
|
||||
/* copy segment values */
|
||||
gst_event_copy_segment (event, &segment);
|
||||
seqnum = gst_event_get_seqnum (event);
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_segment_offset_running_time (&segment, segment.format, pad_offset);
|
||||
event = gst_event_new_segment (&segment);
|
||||
gst_event_set_seqnum (event, seqnum);
|
||||
}
|
||||
|
||||
event = gst_event_make_writable (event);
|
||||
|
|
Loading…
Reference in a new issue