rtspsrc: Make segment event writable before overriding the seqnum and use the proper API to do so

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3409>
This commit is contained in:
Sebastian Dröge 2022-11-14 19:14:27 +02:00 committed by GStreamer Marge Bot
parent 4099fd064b
commit e6efd288c2

View file

@ -3134,8 +3134,10 @@ gst_rtspsrc_update_src_event (GstRTSPSrc * self, GstRTSPStream * stream,
break;
}
case GST_EVENT_SEGMENT:
if (self->seek_seqnum != GST_SEQNUM_INVALID)
GST_EVENT_SEQNUM (event) = self->seek_seqnum;
if (self->seek_seqnum != GST_SEQNUM_INVALID) {
event = gst_event_make_writable (event);
gst_event_set_seqnum (event, self->seek_seqnum);
}
break;
default:
break;