rtspsrc: handle seek event on the element
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 28 Jun 2019 22:25:26 +0000 (00:25 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Fri, 28 Jun 2019 22:25:26 +0000 (00:25 +0200)
Without this, the user has to wait for rtspsrc to have sent a PLAY
request and exposed its pads before seeking it.

gst/rtsp/gstrtspsrc.c

index 77b0cd1..49523d7 100644 (file)
@@ -8962,7 +8962,9 @@ gst_rtspsrc_send_event (GstElement * element, GstEvent * event)
 
   rtspsrc = GST_RTSPSRC (element);
 
-  if (GST_EVENT_IS_DOWNSTREAM (event)) {
+  if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
+    res = gst_rtspsrc_perform_seek (rtspsrc, event);
+  } else if (GST_EVENT_IS_DOWNSTREAM (event)) {
     res = gst_rtspsrc_push_event (rtspsrc, event);
   } else {
     res = GST_ELEMENT_CLASS (parent_class)->send_event (element, event);