mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
rtpbasedepayload: Properly propagate segment seqnum
This wasn't done previously and the outgoing SEGMENT events had seqnums which weren't consistent with the upstream ones
This commit is contained in:
parent
5c118e5924
commit
924eb8d8a7
1 changed files with 5 additions and 0 deletions
|
@ -56,6 +56,7 @@ struct _GstRTPBaseDepayloadPrivate
|
|||
|
||||
GstCaps *last_caps;
|
||||
GstEvent *segment_event;
|
||||
guint32 segment_seqnum; /* Note: this is a GstEvent seqnum */
|
||||
};
|
||||
|
||||
/* Filter signals and args */
|
||||
|
@ -583,6 +584,7 @@ gst_rtp_base_depayload_handle_event (GstRTPBaseDepayload * filter,
|
|||
GST_ERROR_OBJECT (filter, "Segment with non-TIME format not supported");
|
||||
res = FALSE;
|
||||
}
|
||||
filter->priv->segment_seqnum = gst_event_get_seqnum (event);
|
||||
filter->segment = segment;
|
||||
GST_OBJECT_UNLOCK (filter);
|
||||
|
||||
|
@ -703,6 +705,8 @@ create_segment_event (GstRTPBaseDepayload * filter, guint rtptime,
|
|||
GST_DEBUG_OBJECT (filter, "Creating segment event %" GST_SEGMENT_FORMAT,
|
||||
&segment);
|
||||
event = gst_event_new_segment (&segment);
|
||||
if (filter->priv->segment_seqnum != GST_SEQNUM_INVALID)
|
||||
gst_event_set_seqnum (event, filter->priv->segment_seqnum);
|
||||
|
||||
return event;
|
||||
}
|
||||
|
@ -877,6 +881,7 @@ gst_rtp_base_depayload_change_state (GstElement * element,
|
|||
priv->next_seqnum = -1;
|
||||
priv->negotiated = FALSE;
|
||||
priv->discont = FALSE;
|
||||
priv->segment_seqnum = GST_SEQNUM_INVALID;
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue