mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
rtspsrc: De-dup seek event seqnums to avoid multiple seeks
Seek events are sent upstream on each sink, so if we receive multiple seeks with the same seqnum, we must only perform one seek, not N seeks where N = the number of sinks in the pipeline connected to rtspsrc. This is the same thing done by demuxers like qtdemux or matrsokademux. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/938>
This commit is contained in:
parent
57e4eab72d
commit
590fbb4ddd
1 changed files with 9 additions and 1 deletions
|
@ -2978,7 +2978,15 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstObject * parent,
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
|
{
|
||||||
|
guint32 seqnum = gst_event_get_seqnum (event);
|
||||||
|
if (seqnum == src->seek_seqnum) {
|
||||||
|
GST_LOG_OBJECT (pad, "Drop duplicated SEEK event seqnum %"
|
||||||
|
G_GUINT32_FORMAT, seqnum);
|
||||||
|
} else {
|
||||||
res = gst_rtspsrc_perform_seek (src, event);
|
res = gst_rtspsrc_perform_seek (src, event);
|
||||||
|
}
|
||||||
|
}
|
||||||
forward = FALSE;
|
forward = FALSE;
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_QOS:
|
case GST_EVENT_QOS:
|
||||||
|
|
Loading…
Reference in a new issue