diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2021-04-10 03:09:44 +0530 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-12 03:32:08 +0000 |
commit | 590fbb4ddddf543ff12cc75ae7201a6485a9899e (patch) | |
tree | 2310cb0474f8c5f4a2416493e6594db10fba2a50 | |
parent | 57e4eab72d00677eb60c7bda1feeef833e043038 (diff) |
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>
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index e59e05e40..51a70b73b 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2978,7 +2978,15 @@ gst_rtspsrc_handle_src_event (GstPad * pad, GstObject * parent, switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: - res = gst_rtspsrc_perform_seek (src, event); + { + 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); + } + } forward = FALSE; break; case GST_EVENT_QOS: |